home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 9 / AMUG BBS in a Box Volume IX (August 1993) (MacWizards).iso / Files / Art / I / Image 1.49.cpt / Image 1.49 Folder / Image 1.49 / Macros / Measurement Macros < prev    next >
MacBinary  |  1993-03-26  |  12.6 KB  |  [TEXT/ttxt]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Fri Mar 26 14:38:40 1993, modified Fri Mar 26 14:38:40 1993, creator SimpleText, type ASCII, 12296 bytes "Measurement Macros" , at 0x3088 286 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[ttxt]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 12 4d 65 61 73 75 72 | 65 6d 65 6e 74 20 4d 61 |..Measur|ement Ma|
|00000010| 63 72 6f 73 00 00 00 00 | 00 00 00 00 00 00 00 00 |cros....|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 74 74 78 | 74 00 00 00 00 00 00 00 |.TEXTttx|t.......|
|00000050| 00 00 00 00 00 30 08 00 | 00 01 1e a7 d9 0c 40 a7 |.....0..|......@.|
|00000060| d9 0c 40 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..@.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 3a 8d 00 00 |........|....:...|
|00000080| 6d 61 63 72 6f 20 27 50 | 6c 6f 74 20 58 2d 59 20 |macro 'P|lot X-Y |
|00000090| 43 6f 6f 72 64 69 6e 61 | 74 65 73 27 3b 0d 7b 50 |Coordina|tes';.{P|
|000000a0| 6c 6f 74 73 20 74 68 65 | 20 58 2d 59 20 43 6f 6f |lots the| X-Y Coo|
|000000b0| 72 64 69 6e 61 74 65 73 | 20 6f 66 20 74 68 65 20 |rdinates| of the |
|000000c0| 63 75 72 72 65 6e 74 20 | 52 4f 49 2e 20 54 68 65 |current |ROI. The|
|000000d0| 20 70 6c 6f 74 20 77 69 | 6c 6c 20 62 65 0d 20 75 | plot wi|ll be. u|
|000000e0| 70 73 69 64 65 20 64 6f | 77 6e 20 69 66 20 22 49 |pside do|wn if "I|
|000000f0| 6e 76 65 72 74 20 59 20 | 43 6f 6f 72 64 69 6e 61 |nvert Y |Coordina|
|00000100| 74 65 73 22 20 69 73 20 | 63 68 65 63 6b 65 64 20 |tes" is |checked |
|00000110| 69 6e 20 50 72 65 66 65 | 72 65 6e 63 65 73 2e 7d |in Prefe|rences.}|
|00000120| 0d 76 61 72 0d 20 20 69 | 2c 77 2c 68 2c 77 69 64 |.var. i|,w,h,wid|
|00000130| 74 68 2c 68 65 69 67 68 | 74 3a 69 6e 74 65 67 65 |th,heigh|t:intege|
|00000140| 72 3b 0d 20 20 78 2c 79 | 2c 73 63 61 6c 65 2c 78 |r;. x,y|,scale,x|
|00000150| 6d 61 78 2c 79 6d 61 78 | 3a 72 65 61 6c 20 0d 62 |max,ymax|:real .b|
|00000160| 65 67 69 6e 0d 20 20 52 | 65 71 75 69 72 65 73 56 |egin. R|equiresV|
|00000170| 65 72 73 69 6f 6e 28 31 | 2e 34 38 29 3b 0d 20 20 |ersion(1|.48);. |
|00000180| 69 66 20 6e 43 6f 6f 72 | 64 69 6e 61 74 65 73 3d |if nCoor|dinates=|
|00000190| 30 20 74 68 65 6e 20 62 | 65 67 69 6e 0d 20 20 20 |0 then b|egin. |
|000001a0| 20 50 75 74 4d 65 73 73 | 61 67 65 28 27 4e 6f 20 | PutMess|age('No |
|000001b0| 58 59 2d 43 6f 6f 72 64 | 69 6e 61 74 65 73 20 63 |XY-Coord|inates c|
|000001c0| 75 72 72 65 6e 74 6c 79 | 20 61 76 61 69 6c 61 62 |urrently| availab|
|000001d0| 6c 65 2e 27 29 3b 0d 20 | 20 20 20 65 78 69 74 3b |le.');. | exit;|
|000001e0| 0d 20 20 65 6e 64 3b 0d | 20 20 53 61 76 65 53 74 |. end;.| SaveSt|
|000001f0| 61 74 65 3b 0d 20 20 49 | 6e 76 65 72 74 59 28 66 |ate;. I|nvertY(f|
|00000200| 61 6c 73 65 29 3b 0d 20 | 20 78 6d 61 78 3a 3d 30 |alse);. | xmax:=0|
|00000210| 3b 0d 20 20 79 6d 61 78 | 3a 3d 30 3b 0d 20 20 66 |;. ymax|:=0;. f|
|00000220| 6f 72 20 69 3a 3d 31 20 | 74 6f 20 6e 43 6f 6f 72 |or i:=1 |to nCoor|
|00000230| 64 69 6e 61 74 65 73 20 | 64 6f 20 62 65 67 69 6e |dinates |do begin|
|00000240| 0d 20 20 20 20 78 3a 3d | 78 43 6f 6f 72 64 69 6e |. x:=|xCoordin|
|00000250| 61 74 65 73 5b 69 5d 3b | 0d 20 20 20 20 79 3a 3d |ates[i];|. y:=|
|00000260| 79 43 6f 6f 72 64 69 6e | 61 74 65 73 5b 69 5d 3b |yCoordin|ates[i];|
|00000270| 0d 20 20 20 20 69 66 20 | 78 3e 78 6d 61 78 20 74 |. if |x>xmax t|
|00000280| 68 65 6e 20 78 6d 61 78 | 3a 3d 78 3b 0d 20 20 20 |hen xmax|:=x;. |
|00000290| 20 69 66 20 79 3e 79 6d | 61 78 20 74 68 65 6e 20 | if y>ym|ax then |
|000002a0| 79 6d 61 78 3a 3d 79 3b | 0d 20 20 65 6e 64 3b 0d |ymax:=y;|. end;.|
|000002b0| 20 20 73 63 61 6c 65 3a | 3d 73 71 72 74 28 28 33 | scale:|=sqrt((3|
|000002c0| 30 30 2a 33 30 30 29 2f | 28 78 6d 61 78 2a 79 6d |00*300)/|(xmax*ym|
|000002d0| 61 78 29 29 3b 0d 20 20 | 69 66 20 28 78 6d 61 78 |ax));. |if (xmax|
|000002e0| 2a 73 63 61 6c 65 29 3e | 35 30 30 20 74 68 65 6e |*scale)>|500 then|
|000002f0| 20 73 63 61 6c 65 3a 3d | 35 30 30 2f 78 6d 61 78 | scale:=|500/xmax|
|00000300| 3b 0d 20 20 69 66 20 28 | 79 6d 61 78 2a 73 63 61 |;. if (|ymax*sca|
|00000310| 6c 65 29 3e 35 30 30 20 | 74 68 65 6e 20 73 63 61 |le)>500 |then sca|
|00000320| 6c 65 3a 3d 35 30 30 2f | 79 6d 61 78 3b 0d 20 20 |le:=500/|ymax;. |
|00000330| 53 65 74 46 6f 72 65 67 | 72 6f 75 6e 64 43 6f 6c |SetForeg|roundCol|
|00000340| 6f 72 28 32 35 35 29 3b | 0d 20 20 53 65 74 42 61 |or(255);|. SetBa|
|00000350| 63 6b 67 72 6f 75 6e 64 | 43 6f 6c 6f 72 28 30 29 |ckground|Color(0)|
|00000360| 3b 0d 20 20 53 65 74 4e | 65 77 53 69 7a 65 28 78 |;. SetN|ewSize(x|
|00000370| 6d 61 78 2a 73 63 61 6c | 65 2b 32 30 2c 79 6d 61 |max*scal|e+20,yma|
|00000380| 78 2a 73 63 61 6c 65 2b | 32 30 29 3b 0d 20 20 4d |x*scale+|20);. M|
|00000390| 61 6b 65 4e 65 77 57 69 | 6e 64 6f 77 28 27 4f 75 |akeNewWi|ndow('Ou|
|000003a0| 74 6c 69 6e 65 27 29 3b | 0d 20 20 4d 6f 76 65 54 |tline');|. MoveT|
|000003b0| 6f 28 78 43 6f 6f 72 64 | 69 6e 61 74 65 73 5b 31 |o(xCoord|inates[1|
|000003c0| 5d 2a 73 63 61 6c 65 2b | 31 30 2c 79 43 6f 6f 72 |]*scale+|10,yCoor|
|000003d0| 64 69 6e 61 74 65 73 5b | 31 5d 2a 73 63 61 6c 65 |dinates[|1]*scale|
|000003e0| 2b 31 30 29 3b 0d 20 20 | 66 6f 72 20 69 3a 3d 32 |+10);. |for i:=2|
|000003f0| 20 74 6f 20 6e 43 6f 6f | 72 64 69 6e 61 74 65 73 | to nCoo|rdinates|
|00000400| 20 64 6f 0d 20 20 20 20 | 4c 69 6e 65 54 6f 28 78 | do. |LineTo(x|
|00000410| 43 6f 6f 72 64 69 6e 61 | 74 65 73 5b 69 5d 2a 73 |Coordina|tes[i]*s|
|00000420| 63 61 6c 65 2b 31 30 2c | 79 43 6f 6f 72 64 69 6e |cale+10,|yCoordin|
|00000430| 61 74 65 73 5b 69 5d 2a | 73 63 61 6c 65 2b 31 30 |ates[i]*|scale+10|
|00000440| 29 3b 0d 20 20 53 65 74 | 46 6f 6e 74 28 27 48 65 |);. Set|Font('He|
|00000450| 6c 76 65 74 69 63 61 27 | 29 3b 0d 20 20 53 65 74 |lvetica'|);. Set|
|00000460| 46 6f 6e 74 53 69 7a 65 | 28 31 32 29 3b 0d 20 20 |FontSize|(12);. |
|00000470| 53 65 74 54 65 78 74 28 | 27 4e 6f 20 62 61 63 6b |SetText(|'No back|
|00000480| 67 72 6f 75 6e 64 2c 20 | 43 65 6e 74 65 72 27 29 |ground, |Center')|
|00000490| 3b 0d 20 20 47 65 74 50 | 69 63 53 69 7a 65 28 77 |;. GetP|icSize(w|
|000004a0| 69 64 74 68 2c 68 65 69 | 67 68 74 29 3b 0d 20 20 |idth,hei|ght);. |
|000004b0| 4d 6f 76 65 54 6f 28 77 | 69 64 74 68 2f 32 2c 68 |MoveTo(w|idth/2,h|
|000004c0| 65 69 67 68 74 2f 33 29 | 3b 0d 20 20 57 72 69 74 |eight/3)|;. Writ|
|000004d0| 65 6c 6e 28 6e 43 6f 6f | 72 64 69 6e 61 74 65 73 |eln(nCoo|rdinates|
|000004e0| 3a 31 2c 27 20 63 6f 6f | 72 64 69 6e 61 74 65 20 |:1,' coo|rdinate |
|000004f0| 70 61 69 72 73 27 29 3b | 0d 20 20 52 65 73 74 6f |pairs');|. Resto|
|00000500| 72 65 53 74 61 74 65 3b | 0d 65 6e 64 3b 0d 0d 0d |reState;|.end;...|
|00000510| 6d 61 63 72 6f 20 27 50 | 61 72 74 69 63 6c 65 20 |macro 'P|article |
|00000520| 41 6e 61 6c 79 73 69 73 | 20 54 65 73 74 27 3b 0d |Analysis| Test';.|
|00000530| 76 61 72 0d 20 20 78 2c | 79 2c 72 6f 77 73 2c 63 |var. x,|y,rows,c|
|00000540| 6f 6c 75 6d 6e 73 2c 6d | 61 78 72 61 64 69 75 73 |olumns,m|axradius|
|00000550| 2c 72 61 64 69 75 73 3a | 69 6e 74 65 67 65 72 3b |,radius:|integer;|
|00000560| 0d 62 65 67 69 6e 0d 20 | 20 53 61 76 65 53 74 61 |.begin. | SaveSta|
|00000570| 74 65 3b 0d 20 20 72 6f | 77 73 3a 3d 35 3b 20 63 |te;. ro|ws:=5; c|
|00000580| 6f 6c 75 6d 6e 73 3a 3d | 35 3b 0d 20 20 6d 61 78 |olumns:=|5;. max|
|00000590| 72 61 64 69 75 73 3a 3d | 72 6f 77 73 2a 63 6f 6c |radius:=|rows*col|
|000005a0| 75 6d 6e 73 3b 0d 20 20 | 53 65 74 46 6f 72 65 67 |umns;. |SetForeg|
|000005b0| 72 6f 75 6e 64 43 6f 6c | 6f 72 28 32 35 35 29 3b |roundCol|or(255);|
|000005c0| 0d 20 20 53 65 74 42 61 | 63 6b 67 72 6f 75 6e 64 |. SetBa|ckground|
|000005d0| 43 6f 6c 6f 72 28 30 29 | 3b 0d 20 20 53 65 74 4e |Color(0)|;. SetN|
|000005e0| 65 77 53 69 7a 65 28 63 | 6f 6c 75 6d 6e 73 2a 6d |ewSize(c|olumns*m|
|000005f0| 61 78 72 61 64 69 75 73 | 2a 32 2b 32 30 2c 72 6f |axradius|*2+20,ro|
|00000600| 77 73 2a 6d 61 78 72 61 | 64 69 75 73 2a 32 2b 32 |ws*maxra|dius*2+2|
|00000610| 30 29 3b 0d 20 20 4d 61 | 6b 65 4e 65 77 57 69 6e |0);. Ma|keNewWin|
|00000620| 64 6f 77 28 27 4f 62 6a | 65 63 74 73 27 29 3b 0d |dow('Obj|ects');.|
|00000630| 20 20 72 61 64 69 75 73 | 3a 3d 31 3b 0d 20 20 66 | radius|:=1;. f|
|00000640| 6f 72 20 79 3a 3d 30 20 | 74 6f 20 63 6f 6c 75 6d |or y:=0 |to colum|
|00000650| 6e 73 2d 31 20 64 6f 0d | 20 20 20 20 66 6f 72 20 |ns-1 do.| for |
|00000660| 78 3a 3d 30 20 74 6f 20 | 72 6f 77 73 2d 31 20 64 |x:=0 to |rows-1 d|
|00000670| 6f 20 62 65 67 69 6e 0d | 20 20 20 20 20 20 4d 61 |o begin.| Ma|
|00000680| 6b 65 4f 76 61 6c 52 6f | 69 28 78 2a 6d 61 78 72 |keOvalRo|i(x*maxr|
|00000690| 61 64 69 75 73 2a 32 2b | 31 30 2c 79 2a 6d 61 78 |adius*2+|10,y*max|
|000006a0| 72 61 64 69 75 73 2a 32 | 2b 31 30 2c 72 61 64 69 |radius*2|+10,radi|
|000006b0| 75 73 2a 32 2c 72 61 64 | 69 75 73 2a 32 29 3b 0d |us*2,rad|ius*2);.|
|000006c0| 20 20 20 20 20 20 46 69 | 6c 6c 3b 0d 20 20 20 20 | Fi|ll;. |
|000006d0| 20 20 72 61 64 69 75 73 | 3a 3d 72 61 64 69 75 73 | radius|:=radius|
|000006e0| 2b 31 3b 0d 20 20 20 20 | 65 6e 64 3b 0d 20 20 4b |+1;. |end;. K|
|000006f0| 69 6c 6c 52 6f 69 3b 0d | 20 20 53 65 74 50 61 72 |illRoi;.| SetPar|
|00000700| 74 69 63 6c 65 53 69 7a | 65 28 31 2c 39 39 39 39 |ticleSiz|e(1,9999|
|00000710| 29 3b 0d 20 20 4c 61 62 | 65 6c 50 61 72 74 69 63 |);. Lab|elPartic|
|00000720| 6c 65 73 28 74 72 75 65 | 29 3b 0d 20 20 4f 75 74 |les(true|);. Out|
|00000730| 6c 69 6e 65 50 61 72 74 | 69 63 6c 65 73 28 74 72 |linePart|icles(tr|
|00000740| 75 65 29 3b 0d 20 20 53 | 65 74 4f 70 74 69 6f 6e |ue);. S|etOption|
|00000750| 73 28 27 41 72 65 61 2c | 20 50 65 72 69 6d 65 74 |s('Area,| Perimet|
|00000760| 65 72 2c 20 4d 61 6a 6f | 72 2c 20 4d 69 6e 6f 72 |er, Majo|r, Minor|
|00000770| 27 29 3b 0d 20 20 41 6e | 61 6c 79 7a 65 50 61 72 |');. An|alyzePar|
|00000780| 74 69 63 6c 65 73 3b 0d | 20 20 53 65 74 55 73 65 |ticles;.| SetUse|
|00000790| 72 31 4c 61 62 65 6c 28 | 27 50 65 72 69 6d 2e 64 |r1Label(|'Perim.d|
|000007a0| 27 29 3b 0d 20 20 53 65 | 74 55 73 65 72 32 4c 61 |');. Se|tUser2La|
|000007b0| 62 65 6c 28 27 41 72 65 | 61 27 29 3b 0d 20 20 66 |bel('Are|a');. f|
|000007c0| 6f 72 20 72 61 64 69 75 | 73 3a 3d 31 20 74 6f 20 |or radiu|s:=1 to |
|000007d0| 6d 61 78 72 61 64 69 75 | 73 20 64 6f 20 62 65 67 |maxradiu|s do beg|
|000007e0| 69 6e 0d 20 20 20 20 72 | 55 73 65 72 31 5b 72 61 |in. r|User1[ra|
|000007f0| 64 69 75 73 5d 3a 3d 32 | 2a 33 2e 31 34 31 35 39 |dius]:=2|*3.14159|
|00000800| 2a 72 61 64 69 75 73 3b | 0d 20 20 20 20 72 55 73 |*radius;|. rUs|
|00000810| 65 72 32 5b 72 61 64 69 | 75 73 5d 3a 3d 33 2e 31 |er2[radi|us]:=3.1|
|00000820| 34 31 35 39 2a 73 71 72 | 28 72 61 64 69 75 73 29 |4159*sqr|(radius)|
|00000830| 3b 0d 20 20 65 6e 64 3b | 0d 20 20 53 68 6f 77 52 |;. end;|. ShowR|
|00000840| 65 73 75 6c 74 73 3b 0d | 20 20 52 65 73 74 6f 72 |esults;.| Restor|
|00000850| 65 53 74 61 74 65 3b 0d | 65 6e 64 3b 0d 0d 0d 6d |eState;.|end;...m|
|00000860| 61 63 72 6f 20 27 43 6f | 75 6e 74 20 50 61 72 74 |acro 'Co|unt Part|
|00000870| 69 63 6c 65 73 20 61 74 | 20 52 61 6e 64 6f 6d 20 |icles at| Random |
|00000880| 4c 6f 63 61 74 69 6f 6e | 73 27 3b 0d 76 61 72 0d |Location|s';.var.|
|00000890| 20 20 6e 2c 69 2c 77 69 | 64 74 68 2c 68 65 69 67 | n,i,wi|dth,heig|
|000008a0| 68 74 2c 50 69 63 49 44 | 2c 6e 4c 6f 63 61 74 69 |ht,PicID|,nLocati|
|000008b0| 6f 6e 73 3a 69 6e 74 65 | 67 65 72 3b 0d 20 20 73 |ons:inte|ger;. s|
|000008c0| 69 7a 65 3a 72 65 61 6c | 3b 0d 62 65 67 69 6e 0d |ize:real|;.begin.|
|000008d0| 20 20 52 65 71 75 69 72 | 65 73 56 65 72 73 69 6f | Requir|esVersio|
|000008e0| 6e 28 31 2e 34 34 29 3b | 0d 20 20 6e 4c 6f 63 61 |n(1.44);|. nLoca|
|000008f0| 74 69 6f 6e 73 3a 3d 31 | 30 3b 0d 20 20 73 69 7a |tions:=1|0;. siz|
|00000900| 65 3a 3d 30 2e 32 35 3b | 0d 20 20 6e 3a 3d 31 3b |e:=0.25;|. n:=1;|
|00000910| 0d 20 20 47 65 74 50 69 | 63 53 69 7a 65 28 77 69 |. GetPi|cSize(wi|
|00000920| 64 74 68 2c 68 65 69 67 | 68 74 29 3b 0d 20 20 50 |dth,heig|ht);. P|
|00000930| 69 63 49 44 3a 3d 50 69 | 63 4e 75 6d 62 65 72 3b |icID:=Pi|cNumber;|
|00000940| 0d 20 20 53 65 74 55 73 | 65 72 31 4c 61 62 65 6c |. SetUs|er1Label|
|00000950| 28 27 43 6f 75 6e 74 27 | 29 3b 0d 20 20 53 65 74 |('Count'|);. Set|
|00000960| 4f 70 74 69 6f 6e 73 28 | 27 55 73 65 72 31 27 29 |Options(|'User1')|
|00000970| 3b 0d 20 20 66 6f 72 20 | 69 3a 3d 31 20 74 6f 20 |;. for |i:=1 to |
|00000980| 6e 4c 6f 63 61 74 69 6f | 6e 73 20 64 6f 20 62 65 |nLocatio|ns do be|
|00000990| 67 69 6e 0d 20 20 20 20 | 53 65 6c 65 63 74 50 69 |gin. |SelectPi|
|000009a0| 63 28 50 69 63 49 44 29 | 3b 0d 20 20 20 20 4d 61 |c(PicID)|;. Ma|
|000009b0| 6b 65 52 6f 69 28 28 31 | 2d 73 69 7a 65 29 2a 77 |keRoi((1|-size)*w|
|000009c0| 69 64 74 68 2a 72 61 6e | 64 6f 6d 2c 28 31 2d 73 |idth*ran|dom,(1-s|
|000009d0| 69 7a 65 29 2a 68 65 69 | 67 68 74 2a 72 61 6e 64 |ize)*hei|ght*rand|
|000009e0| 6f 6d 2c 73 69 7a 65 2a | 77 69 64 74 68 2c 73 69 |om,size*|width,si|
|000009f0| 7a 65 2a 68 65 69 67 68 | 74 29 3b 0d 20 20 20 20 |ze*heigh|t);. |
|00000a00| 44 75 70 6c 69 63 61 74 | 65 28 27 54 65 6d 70 27 |Duplicat|e('Temp'|
|00000a10| 29 3b 3b 0d 20 20 20 20 | 53 65 74 44 65 6e 73 69 |);;. |SetDensi|
|00000a20| 74 79 53 6c 69 63 65 28 | 32 35 35 2c 32 35 35 29 |tySlice(|255,255)|
|00000a30| 3b 0d 20 20 20 20 41 6e | 61 6c 79 7a 65 50 61 72 |;. An|alyzePar|
|00000a40| 74 69 63 6c 65 73 3b 0d | 20 20 20 20 44 69 73 70 |ticles;.| Disp|
|00000a50| 6f 73 65 3b 0d 20 20 20 | 20 72 55 73 65 72 31 5b |ose;. | rUser1[|
|00000a60| 69 5d 3a 3d 72 43 6f 75 | 6e 74 3b 0d 20 20 65 6e |i]:=rCou|nt;. en|
|00000a70| 64 3b 0d 20 20 4b 69 6c | 6c 52 6f 69 3b 0d 20 20 |d;. Kil|lRoi;. |
|00000a80| 53 65 74 43 6f 75 6e 74 | 65 72 28 6e 4c 6f 63 61 |SetCount|er(nLoca|
|00000a90| 74 69 6f 6e 73 29 3b 0d | 20 20 53 68 6f 77 52 65 |tions);.| ShowRe|
|00000aa0| 73 75 6c 74 73 3b 0d 65 | 6e 64 3b 0d 0d 0d 6d 61 |sults;.e|nd;...ma|
|00000ab0| 63 72 6f 20 27 4d 61 6b | 65 20 43 69 72 63 6c 65 |cro 'Mak|e Circle|
|00000ac0| 20 66 72 6f 6d 20 4c 69 | 6e 65 27 3b 0d 76 61 72 | from Li|ne';.var|
|00000ad0| 0d 20 20 78 31 2c 78 32 | 2c 79 31 2c 79 32 2c 74 |. x1,x2|,y1,y2,t|
|00000ae0| 6f 70 2c 6c 65 66 74 2c | 77 69 64 74 68 2c 68 65 |op,left,|width,he|
|00000af0| 69 67 68 74 3a 69 6e 74 | 65 67 65 72 3b 0d 20 20 |ight:int|eger;. |
|00000b00| 78 63 65 6e 74 65 72 2c | 79 63 65 6e 74 65 72 2c |xcenter,|ycenter,|
|00000b10| 72 61 64 69 75 73 3a 69 | 6e 74 65 67 65 72 3b 0d |radius:i|nteger;.|
|00000b20| 62 65 67 69 6e 0d 20 20 | 47 65 74 4c 69 6e 65 28 |begin. |GetLine(|
|00000b30| 78 31 2c 79 31 2c 78 32 | 2c 79 32 2c 77 69 64 74 |x1,y1,x2|,y2,widt|
|00000b40| 68 29 3b 0d 20 20 69 66 | 20 78 31 3c 30 20 74 68 |h);. if| x1<0 th|
|00000b50| 65 6e 20 62 65 67 69 6e | 0d 20 20 20 20 50 75 74 |en begin|. Put|
|00000b60| 4d 65 73 73 61 67 65 28 | 27 54 68 69 73 20 6d 61 |Message(|'This ma|
|00000b70| 63 72 6f 20 72 65 71 75 | 69 72 65 73 20 61 20 6c |cro requ|ires a l|
|00000b80| 69 6e 65 20 73 65 6c 65 | 63 74 69 6f 6e 2e 27 29 |ine sele|ction.')|
|00000b90| 3b 0d 20 20 20 20 65 78 | 69 74 3b 0d 20 20 65 6e |;. ex|it;. en|
|00000ba0| 64 3b 0d 20 20 78 63 65 | 6e 74 65 72 3a 3d 78 31 |d;. xce|nter:=x1|
|00000bb0| 2b 28 78 32 2d 78 31 29 | 2f 32 3b 0d 20 20 79 63 |+(x2-x1)|/2;. yc|
|00000bc0| 65 6e 74 65 72 3a 3d 79 | 31 2b 28 79 32 2d 79 31 |enter:=y|1+(y2-y1|
|00000bd0| 29 2f 32 3b 0d 20 20 72 | 61 64 69 75 73 3a 3d 73 |)/2;. r|adius:=s|
|00000be0| 71 72 74 28 73 71 72 28 | 78 32 2d 78 31 29 2b 73 |qrt(sqr(|x2-x1)+s|
|00000bf0| 71 72 28 79 32 2d 79 31 | 29 29 2f 32 3b 0d 20 20 |qr(y2-y1|))/2;. |
|00000c00| 4d 61 6b 65 4f 76 61 6c | 52 4f 49 28 78 63 65 6e |MakeOval|ROI(xcen|
|00000c10| 74 65 72 2d 72 61 64 69 | 75 73 2c 79 63 65 6e 74 |ter-radi|us,ycent|
|00000c20| 65 72 2d 72 61 64 69 75 | 73 2c 72 61 64 69 75 73 |er-radiu|s,radius|
|00000c30| 2a 32 2c 72 61 64 69 75 | 73 2a 32 29 3b 0d 65 6e |*2,radiu|s*2);.en|
|00000c40| 64 3b 0d 0d 0d 6d 61 63 | 72 6f 20 27 44 69 73 70 |d;...mac|ro 'Disp|
|00000c50| 6c 61 79 20 43 61 6c 69 | 62 72 61 74 69 6f 6e 20 |lay Cali|bration |
|00000c60| 54 61 62 6c 65 27 3b 0d | 7b 0d 53 74 6f 72 65 73 |Table';.|{.Stores|
|00000c70| 20 30 2d 32 35 35 28 61 | 6c 6c 20 70 6f 73 73 69 | 0-255(a|ll possi|
|00000c80| 62 6c 65 20 67 72 61 79 | 20 76 61 6c 75 65 73 29 |ble gray| values)|
|00000c90| 20 69 6e 20 74 68 65 20 | 55 73 65 72 31 20 63 6f | in the |User1 co|
|00000ca0| 6c 75 6d 6e 0d 61 6e 64 | 20 74 68 65 20 32 35 36 |lumn.and| the 256|
|00000cb0| 20 63 6f 72 72 65 73 70 | 6f 6e 64 69 6e 67 20 63 | corresp|onding c|
|00000cc0| 61 6c 69 62 72 61 74 65 | 64 20 76 61 6c 75 65 73 |alibrate|d values|
|00000cd0| 20 69 6e 20 74 68 65 20 | 55 73 65 72 32 20 63 6f | in the |User2 co|
|00000ce0| 6c 75 6d 6e 2e 0d 4d 61 | 78 20 4d 65 61 73 75 72 |lumn..Ma|x Measur|
|00000cf0| 65 6d 65 6e 74 73 20 6d | 75 73 74 20 62 65 20 73 |ements m|ust be s|
|00000d00| 65 74 20 74 6f 20 32 35 | 36 20 6f 72 20 67 72 65 |et to 25|6 or gre|
|00000d10| 61 74 65 72 2e 20 55 73 | 65 20 74 68 65 20 45 78 |ater. Us|e the Ex|
|00000d20| 70 6f 72 74 0d 63 6f 6d | 6d 61 6e 64 20 74 6f 20 |port.com|mand to |
|00000d30| 65 78 70 6f 72 74 20 74 | 68 65 20 63 61 6c 69 62 |export t|he calib|
|00000d40| 72 61 74 69 6f 6e 20 74 | 61 62 6c 65 20 74 6f 20 |ration t|able to |
|00000d50| 61 20 74 65 78 74 20 66 | 69 6c 65 2e 20 54 68 65 |a text f|ile. The|
|00000d60| 20 74 77 6f 0d 63 6f 6c | 75 6d 6e 73 20 77 69 6c | two.col|umns wil|
|00000d70| 6c 20 62 65 20 69 64 65 | 6e 74 69 63 61 6c 20 69 |l be ide|ntical i|
|00000d80| 66 20 74 68 65 20 69 6d | 61 67 65 20 69 73 20 6e |f the im|age is n|
|00000d90| 6f 74 20 63 61 6c 69 62 | 72 61 74 65 64 2e 0d 7d |ot calib|rated..}|
|00000da0| 0d 76 61 72 0d 20 20 69 | 3a 69 6e 74 65 67 65 72 |.var. i|:integer|
|00000db0| 3b 0d 20 20 76 3a 72 65 | 61 6c 3b 0d 62 65 67 69 |;. v:re|al;.begi|
|00000dc0| 6e 0d 20 20 52 65 71 75 | 69 72 65 73 56 65 72 73 |n. Requ|iresVers|
|00000dd0| 69 6f 6e 28 31 2e 34 34 | 29 3b 0d 20 20 53 65 74 |ion(1.44|);. Set|
|00000de0| 43 6f 75 6e 74 65 72 28 | 32 35 36 29 3b 0d 20 20 |Counter(|256);. |
|00000df0| 53 65 74 55 73 65 72 31 | 4c 61 62 65 6c 28 27 76 |SetUser1|Label('v|
|00000e00| 61 6c 75 65 27 29 3b 0d | 20 20 53 65 74 55 73 65 |alue');.| SetUse|
|00000e10| 72 32 4c 61 62 65 6c 28 | 27 63 76 61 6c 75 65 27 |r2Label(|'cvalue'|
|00000e20| 29 3b 0d 20 20 66 6f 72 | 20 69 3a 3d 30 20 74 6f |);. for| i:=0 to|
|00000e30| 20 32 35 35 20 64 6f 20 | 62 65 67 69 6e 0d 20 20 | 255 do |begin. |
|00000e40| 20 20 72 55 73 65 72 31 | 5b 69 2b 31 5d 3a 3d 69 | rUser1|[i+1]:=i|
|00000e50| 3b 0d 20 20 20 20 72 55 | 73 65 72 32 5b 69 2b 31 |;. rU|ser2[i+1|
|00000e60| 5d 3a 3d 63 76 61 6c 75 | 65 28 69 29 3b 0d 20 20 |]:=cvalu|e(i);. |
|00000e70| 65 6e 64 3b 0d 20 20 53 | 68 6f 77 52 65 73 75 6c |end;. S|howResul|
|00000e80| 74 73 3b 0d 65 6e 64 3b | 0d 0d 0d 6d 61 63 72 6f |ts;.end;|...macro|
|00000e90| 20 27 4d 65 61 73 75 72 | 65 20 61 6e 64 20 64 72 | 'Measur|e and dr|
|00000ea0| 61 77 20 6c 69 6e 65 20 | 5b 4c 5d 27 3b 0d 76 61 |aw line |[L]';.va|
|00000eb0| 72 0d 20 20 78 31 2c 78 | 32 2c 79 31 2c 79 32 2c |r. x1,x|2,y1,y2,|
|00000ec0| 77 69 64 74 68 3a 69 6e | 74 65 67 65 72 3b 0d 62 |width:in|teger;.b|
|00000ed0| 65 67 69 6e 0d 20 20 47 | 65 74 4c 69 6e 65 28 78 |egin. G|etLine(x|
|00000ee0| 31 2c 79 31 2c 78 32 2c | 79 32 2c 77 69 64 74 68 |1,y1,x2,|y2,width|
|00000ef0| 29 3b 0d 20 20 69 66 20 | 78 31 3c 30 20 74 68 65 |);. if |x1<0 the|
|00000f00| 6e 20 62 65 67 69 6e 0d | 20 20 20 20 50 75 74 4d |n begin.| PutM|
|00000f10| 65 73 73 61 67 65 28 27 | 54 68 69 73 20 6d 61 63 |essage('|This mac|
|00000f20| 72 6f 20 72 65 71 75 69 | 72 65 73 20 61 20 73 74 |ro requi|res a st|
|00000f30| 72 61 69 67 68 74 20 6c | 69 6e 65 20 73 65 6c 65 |raight l|ine sele|
|00000f40| 63 74 69 6f 6e 2e 27 29 | 3b 0d 20 20 20 20 65 78 |ction.')|;. ex|
|00000f50| 69 74 3b 0d 20 20 65 6e | 64 3b 0d 20 20 4d 65 61 |it;. en|d;. Mea|
|00000f60| 73 75 72 65 3b 0d 20 20 | 46 69 6c 6c 3b 0d 20 20 |sure;. |Fill;. |
|00000f70| 4b 69 6c 6c 52 6f 69 3b | 0d 65 6e 64 3b 0d 0d 0d |KillRoi;|.end;...|
|00000f80| 6d 61 63 72 6f 20 27 4d | 65 61 73 75 72 65 20 41 |macro 'M|easure A|
|00000f90| 6c 6c 27 3b 0d 7b 4d 65 | 61 73 75 72 65 73 20 61 |ll';.{Me|asures a|
|00000fa0| 6c 6c 20 63 75 72 72 65 | 6e 74 6c 79 20 6f 70 65 |ll curre|ntly ope|
|00000fb0| 6e 20 69 6d 61 67 65 73 | 20 75 73 69 6e 67 20 74 |n images| using t|
|00000fc0| 68 65 20 63 75 72 72 65 | 6e 74 20 73 65 6c 65 63 |he curre|nt selec|
|00000fd0| 74 69 6f 6e 2e 20 54 68 | 65 72 65 20 69 73 7d 0d |tion. Th|ere is}.|
|00000fe0| 7b 61 6e 20 69 6d 70 6c | 69 65 64 20 22 53 65 6c |{an impl|ied "Sel|
|00000ff0| 65 63 74 20 41 6c 6c 22 | 20 69 66 20 74 68 65 20 |ect All"| if the |
|00001000| 61 63 74 69 76 65 20 69 | 6d 61 67 65 20 64 6f 65 |active i|mage doe|
|00001010| 73 6e 27 74 20 68 61 76 | 65 20 61 20 73 65 6c 65 |sn't hav|e a sele|
|00001020| 63 74 69 6f 6e 2e 7d 0d | 76 61 72 0d 20 20 69 2c |ction.}.|var. i,|
|00001030| 6c 65 66 74 2c 74 6f 70 | 2c 77 69 64 74 68 2c 68 |left,top|,width,h|
|00001040| 65 69 67 68 74 3a 69 6e | 74 65 67 65 72 3b 0d 62 |eight:in|teger;.b|
|00001050| 65 67 69 6e 0d 20 20 52 | 65 73 65 74 43 6f 75 6e |egin. R|esetCoun|
|00001060| 74 65 72 3b 0d 20 20 66 | 6f 72 20 69 3a 3d 31 20 |ter;. f|or i:=1 |
|00001070| 74 6f 20 6e 50 69 63 73 | 20 64 6f 20 62 65 67 69 |to nPics| do begi|
|00001080| 6e 0d 20 20 20 20 53 65 | 6c 65 63 74 50 69 63 28 |n. Se|lectPic(|
|00001090| 69 29 3b 0d 20 20 20 20 | 52 65 73 74 6f 72 65 52 |i);. |RestoreR|
|000010a0| 4f 49 3b 0d 20 20 20 20 | 4d 65 61 73 75 72 65 3b |OI;. |Measure;|
|000010b0| 0d 20 20 65 6e 64 3b 0d | 65 6e 64 3b 0d 0d 0d 6d |. end;.|end;...m|
|000010c0| 61 63 72 6f 20 27 4d 65 | 61 73 75 72 65 20 41 6c |acro 'Me|asure Al|
|000010d0| 6c 20 66 72 6f 6d 20 44 | 69 73 6b 27 3b 0d 7b 0d |l from D|isk';.{.|
|000010e0| 52 65 61 64 73 20 66 72 | 6f 6d 20 64 69 73 6b 20 |Reads fr|om disk |
|000010f0| 61 6e 64 20 6d 65 61 73 | 75 72 65 73 20 61 20 73 |and meas|ures a s|
|00001100| 65 74 20 6f 66 20 69 6d | 61 67 65 73 20 74 6f 6f |et of im|ages too|
|00001110| 20 6c 61 72 67 65 20 74 | 6f 20 73 69 6d 75 6c 74 | large t|o simult|
|00001120| 61 6e 65 6f 75 73 6c 79 | 0d 66 69 74 20 69 6e 20 |aneously|.fit in |
|00001130| 6d 65 6d 6f 72 79 2e 20 | 54 68 65 20 69 6d 61 67 |memory. |The imag|
|00001140| 65 20 6e 61 6d 65 73 20 | 6e 61 6d 65 73 20 6d 75 |e names |names mu|
|00001150| 73 74 20 62 65 20 69 6e | 20 74 68 65 20 66 6f 72 |st be in| the for|
|00001160| 6d 20 27 30 31 27 2c 20 | 27 30 32 27 2c 20 65 74 |m '01', |'02', et|
|00001170| 63 2e 0d 42 65 66 6f 72 | 65 20 73 74 61 72 74 69 |c..Befor|e starti|
|00001180| 6e 67 2c 20 6f 70 65 6e | 20 61 6e 64 20 6f 75 74 |ng, open| and out|
|00001190| 6c 69 6e 65 20 74 68 65 | 20 66 69 72 73 74 20 69 |line the| first i|
|000011a0| 6d 61 67 65 28 27 30 31 | 27 29 2e 0d 7d 0d 76 61 |mage('01|')..}.va|
|000011b0| 72 0d 20 20 69 2c 77 69 | 64 74 68 2c 68 65 69 67 |r. i,wi|dth,heig|
|000011c0| 68 74 3a 69 6e 74 65 67 | 65 72 3b 0d 62 65 67 69 |ht:integ|er;.begi|
|000011d0| 6e 0d 20 20 47 65 74 50 | 69 63 53 69 7a 65 28 77 |n. GetP|icSize(w|
|000011e0| 69 64 74 68 2c 68 65 69 | 67 68 74 29 3b 0d 20 20 |idth,hei|ght);. |
|000011f0| 69 66 20 77 69 64 74 68 | 3d 30 20 74 68 65 6e 20 |if width|=0 then |
|00001200| 62 65 67 69 6e 0d 20 20 | 20 20 50 75 74 4d 65 73 |begin. | PutMes|
|00001210| 73 61 67 65 28 27 42 65 | 66 6f 72 65 20 72 75 6e |sage('Be|fore run|
|00001220| 6e 69 6e 67 20 74 68 69 | 73 20 6d 61 63 72 6f 2c |ning thi|s macro,|
|00001230| 20 6f 70 65 6e 20 61 6e | 64 20 6f 75 74 6c 69 6e | open an|d outlin|
|00001240| 65 20 74 68 65 20 66 69 | 72 73 74 20 69 6d 61 67 |e the fi|rst imag|
|00001250| 65 28 22 30 31 22 29 20 | 69 6e 20 74 68 65 20 73 |e("01") |in the s|
|00001260| 65 72 69 65 73 2e 27 29 | 3b 0d 20 20 20 20 65 78 |eries.')|;. ex|
|00001270| 69 74 3b 0d 20 20 65 6e | 64 3b 0d 20 20 52 65 73 |it;. en|d;. Res|
|00001280| 65 74 43 6f 75 6e 74 65 | 72 73 3b 0d 20 20 4d 65 |etCounte|rs;. Me|
|00001290| 61 73 75 72 65 3b 0d 20 | 20 63 6c 6f 73 65 3b 0d |asure;. | close;.|
|000012a0| 20 20 66 6f 72 20 69 3a | 3d 32 20 74 6f 20 31 30 | for i:|=2 to 10|
|000012b0| 30 30 20 64 6f 20 62 65 | 67 69 6e 0d 20 20 20 20 |00 do be|gin. |
|000012c0| 6f 70 65 6e 28 69 3a 32 | 29 3b 0d 20 20 20 20 52 |open(i:2|);. R|
|000012d0| 65 73 74 6f 72 65 52 4f | 49 3b 0d 20 20 20 20 4d |estoreRO|I;. M|
|000012e0| 65 61 73 75 72 65 3b 0d | 20 20 20 20 63 6c 6f 73 |easure;.| clos|
|000012f0| 65 3b 0d 20 20 65 6e 64 | 3b 0d 65 6e 64 3b 0d 0d |e;. end|;.end;..|
|00001300| 0d 6d 61 63 72 6f 20 27 | 50 61 73 74 65 20 52 65 |.macro '|Paste Re|
|00001310| 73 75 6c 74 73 20 5b 50 | 5d 27 0d 7b 55 73 65 20 |sults [P|]'.{Use |
|00001320| 74 68 65 20 4d 65 61 73 | 75 72 65 20 63 6f 6d 6d |the Meas|ure comm|
|00001330| 61 6e 64 2c 20 74 68 65 | 20 72 75 6c 65 72 20 74 |and, the| ruler t|
|00001340| 6f 6f 6c 2c 20 6f 72 20 | 74 68 65 20 70 6f 69 6e |ool, or |the poin|
|00001350| 74 69 6e 67 20 74 6f 6f | 6c 20 74 6f 7d 0d 7b 6d |ting too|l to}.{m|
|00001360| 61 6b 65 20 75 70 20 74 | 6f 20 61 62 6f 75 74 20 |ake up t|o about |
|00001370| 31 30 20 6d 65 61 73 75 | 72 65 6d 65 6e 74 73 2c |10 measu|rements,|
|00001380| 20 74 68 65 6e 20 75 73 | 65 20 74 68 69 73 20 6d | then us|e this m|
|00001390| 61 63 72 6f 20 74 6f 20 | 70 61 73 74 65 7d 0d 7b |acro to |paste}.{|
|000013a0| 74 68 65 20 72 65 73 75 | 6c 74 73 20 69 6e 74 6f |the resu|lts into|
|000013b0| 20 74 68 65 20 75 70 70 | 65 72 20 6c 65 66 74 20 | the upp|er left |
|000013c0| 63 6f 72 6e 65 72 20 6f | 66 20 74 68 65 20 77 69 |corner o|f the wi|
|000013d0| 6e 64 6f 77 2e 7d 0d 62 | 65 67 69 6e 0d 20 20 53 |ndow.}.b|egin. S|
|000013e0| 65 74 46 6f 6e 74 28 27 | 4d 6f 6e 61 63 6f 27 29 |etFont('|Monaco')|
|000013f0| 3b 0d 20 20 53 65 74 46 | 6f 6e 74 53 69 7a 65 28 |;. SetF|ontSize(|
|00001400| 39 29 3b 0d 20 20 53 65 | 74 54 65 78 74 28 27 50 |9);. Se|tText('P|
|00001410| 6c 61 69 6e 3b 20 41 6c | 69 67 6e 20 4c 65 66 74 |lain; Al|ign Left|
|00001420| 27 29 3b 0d 20 20 53 65 | 74 4f 70 74 69 6f 6e 3b |');. Se|tOption;|
|00001430| 20 7b 43 6f 70 79 20 68 | 65 61 64 69 6e 67 73 7d | {Copy h|eadings}|
|00001440| 0d 20 20 43 6f 70 79 52 | 65 73 75 6c 74 73 3b 0d |. CopyR|esults;.|
|00001450| 20 20 4d 61 6b 65 52 6f | 69 28 2d 31 30 2c 30 2c | MakeRo|i(-10,0,|
|00001460| 32 35 30 2c 31 35 30 29 | 3b 0d 20 20 50 61 73 74 |250,150)|;. Past|
|00001470| 65 3b 0d 20 20 4b 69 6c | 6c 52 6f 69 3b 0d 20 20 |e;. Kil|lRoi;. |
|00001480| 52 65 73 65 74 43 6f 75 | 6e 74 65 72 3b 0d 65 6e |ResetCou|nter;.en|
|00001490| 64 3b 0d 0d 0d 6d 61 63 | 72 6f 20 27 4d 65 61 73 |d;...mac|ro 'Meas|
|000014a0| 75 72 65 20 52 65 64 69 | 72 65 63 74 65 64 20 61 |ure Redi|rected a|
|000014b0| 6e 64 20 4c 61 62 65 6c | 27 0d 62 65 67 69 6e 0d |nd Label|'.begin.|
|000014c0| 20 20 52 65 64 69 72 65 | 63 74 28 74 72 75 65 29 | Redire|ct(true)|
|000014d0| 3b 0d 20 20 4d 65 61 73 | 75 72 65 3b 0d 20 20 52 |;. Meas|ure;. R|
|000014e0| 65 64 69 72 65 63 74 28 | 66 61 6c 73 65 29 3b 0d |edirect(|false);.|
|000014f0| 20 20 4d 61 72 6b 53 65 | 6c 65 63 74 69 6f 6e 3b | MarkSe|lection;|
|00001500| 0d 20 20 52 65 73 74 6f | 72 65 52 6f 69 3b 0d 65 |. Resto|reRoi;.e|
|00001510| 6e 64 3b 0d 0d 0d 6d 61 | 63 72 6f 20 27 52 65 73 |nd;...ma|cro 'Res|
|00001520| 65 74 20 4d 65 61 73 75 | 72 65 6d 65 6e 74 20 4f |et Measu|rement O|
|00001530| 70 74 69 6f 6e 73 27 3b | 0d 7b 52 65 73 65 74 73 |ptions';|.{Resets|
|00001540| 20 74 68 65 20 4f 70 74 | 69 6f 6e 73 20 64 69 61 | the Opt|ions dia|
|00001550| 6c 6f 67 20 62 6f 78 20 | 69 6e 20 74 68 65 20 41 |log box |in the A|
|00001560| 6e 61 6c 79 7a 65 20 6d | 65 6e 75 20 74 6f 20 74 |nalyze m|enu to t|
|00001570| 68 65 20 64 65 66 61 75 | 6c 74 20 73 65 74 74 69 |he defau|lt setti|
|00001580| 6e 67 73 2e 7d 0d 62 65 | 67 69 6e 0d 20 20 52 65 |ngs.}.be|gin. Re|
|00001590| 71 75 69 72 65 73 56 65 | 72 73 69 6f 6e 28 31 2e |quiresVe|rsion(1.|
|000015a0| 34 34 29 3b 0d 20 20 53 | 65 74 4f 70 74 69 6f 6e |44);. S|etOption|
|000015b0| 73 28 27 41 72 65 61 3b | 20 4d 65 61 6e 27 29 3b |s('Area;| Mean');|
|000015c0| 0d 20 20 52 65 64 69 72 | 65 63 74 28 66 61 6c 73 |. Redir|ect(fals|
|000015d0| 65 29 3b 0d 20 20 4c 61 | 62 65 6c 50 61 72 74 69 |e);. La|belParti|
|000015e0| 63 6c 65 73 28 74 72 75 | 65 29 3b 0d 20 20 4f 75 |cles(tru|e);. Ou|
|000015f0| 74 6c 69 6e 65 50 61 72 | 74 69 63 6c 65 73 28 66 |tlinePar|ticles(f|
|00001600| 61 6c 73 65 29 3b 0d 20 | 20 49 67 6e 6f 72 65 50 |alse);. | IgnoreP|
|00001610| 61 72 74 69 63 6c 65 73 | 54 6f 75 63 68 69 6e 67 |articles|Touching|
|00001620| 45 64 67 65 28 66 61 6c | 73 65 29 3b 0d 20 20 49 |Edge(fal|se);. I|
|00001630| 6e 63 6c 75 64 65 49 6e | 74 65 72 69 6f 72 48 6f |ncludeIn|teriorHo|
|00001640| 6c 65 73 28 66 61 6c 73 | 65 29 3b 0d 20 20 57 61 |les(fals|e);. Wa|
|00001650| 6e 64 41 75 74 6f 4d 65 | 61 73 75 72 65 28 66 61 |ndAutoMe|asure(fa|
|00001660| 6c 73 65 29 3b 0d 20 20 | 41 64 6a 75 73 74 41 72 |lse);. |AdjustAr|
|00001670| 65 61 73 28 66 61 6c 73 | 65 29 3b 0d 20 20 53 65 |eas(fals|e);. Se|
|00001680| 74 50 61 72 74 69 63 6c | 65 53 69 7a 65 28 31 2c |tParticl|eSize(1,|
|00001690| 39 39 39 39 39 39 29 3b | 0d 20 20 53 65 74 50 72 |999999);|. SetPr|
|000016a0| 65 63 69 73 69 6f 6e 28 | 32 29 3b 0d 65 6e 64 3b |ecision(|2);.end;|
|000016b0| 0d 0d 0d 6d 61 63 72 6f | 20 27 53 65 74 20 54 68 |...macro| 'Set Th|
|000016c0| 72 65 73 68 6f 6c 64 27 | 3b 0d 76 61 72 0d 20 20 |reshold'|;.var. |
|000016d0| 6c 6f 77 65 72 2c 75 70 | 70 65 72 3a 69 6e 74 65 |lower,up|per:inte|
|000016e0| 67 65 72 3b 0d 62 65 67 | 69 6e 0d 20 20 6c 6f 77 |ger;.beg|in. low|
|000016f0| 65 72 3a 3d 47 65 74 4e | 75 6d 62 65 72 28 27 4c |er:=GetN|umber('L|
|00001700| 6f 77 65 72 3a 27 2c 31 | 29 3b 0d 20 20 75 70 70 |ower:',1|);. upp|
|00001710| 65 72 3a 3d 47 65 74 4e | 75 6d 62 65 72 28 27 55 |er:=GetN|umber('U|
|00001720| 70 70 65 72 3a 27 2c 32 | 35 34 29 3b 0d 20 20 53 |pper:',2|54);. S|
|00001730| 65 74 44 65 6e 73 69 74 | 79 53 6c 69 63 65 28 6c |etDensit|ySlice(l|
|00001740| 6f 77 65 72 2c 75 70 70 | 65 72 29 3b 0d 65 6e 64 |ower,upp|er);.end|
|00001750| 3b 0d 0d 0d 6d 61 63 72 | 6f 20 27 4d 65 61 73 75 |;...macr|o 'Measu|
|00001760| 72 65 20 41 63 63 75 6d | 75 6c 61 74 65 64 20 50 |re Accum|ulated P|
|00001770| 65 72 69 6d 65 74 65 72 | 5b 41 5d 27 3b 0d 7b 0d |erimeter|[A]';.{.|
|00001780| 4d 65 61 73 75 72 65 73 | 20 70 65 72 69 6d 65 74 |Measures| perimet|
|00001790| 65 72 20 61 6e 64 20 63 | 6f 6d 70 75 74 65 73 20 |er and c|omputes |
|000017a0| 61 63 63 75 6d 75 6c 61 | 74 65 64 20 70 65 72 69 |accumula|ted peri|
|000017b0| 6d 65 74 65 72 2c 0d 73 | 74 6f 72 69 6e 67 20 69 |meter,.s|toring i|
|000017c0| 74 20 69 6e 20 74 68 65 | 20 55 73 65 72 31 20 63 |t in the| User1 c|
|000017d0| 6f 6c 75 6d 6e 2e 0d 7d | 0d 76 61 72 0d 20 20 69 |olumn..}|.var. i|
|000017e0| 3a 69 6e 74 65 67 65 72 | 3b 0d 20 20 54 6f 74 61 |:integer|;. Tota|
|000017f0| 6c 3a 72 65 61 6c 3b 0d | 62 65 67 69 6e 0d 20 20 |l:real;.|begin. |
|00001800| 4d 65 61 73 75 72 65 50 | 65 72 69 6d 65 74 65 72 |MeasureP|erimeter|
|00001810| 28 74 72 75 65 29 3b 0d | 20 20 53 65 74 4f 70 74 |(true);.| SetOpt|
|00001820| 69 6f 6e 73 28 27 41 72 | 65 61 3b 20 4d 65 61 6e |ions('Ar|ea; Mean|
|00001830| 3b 20 50 65 72 69 6d 65 | 74 65 72 3b 20 55 73 65 |; Perime|ter; Use|
|00001840| 72 31 27 29 3b 0d 20 20 | 53 65 74 55 73 65 72 31 |r1');. |SetUser1|
|00001850| 4c 61 62 65 6c 28 27 54 | 6f 74 61 6c 27 29 3b 0d |Label('T|otal');.|
|00001860| 20 20 4d 65 61 73 75 72 | 65 3b 0d 20 20 54 6f 74 | Measur|e;. Tot|
|00001870| 61 6c 3a 3d 30 3b 0d 20 | 20 66 6f 72 20 69 3a 3d |al:=0;. | for i:=|
|00001880| 31 20 74 6f 20 72 43 6f | 75 6e 74 20 64 6f 20 54 |1 to rCo|unt do T|
|00001890| 6f 74 61 6c 3a 3d 54 6f | 74 61 6c 2b 72 4c 65 6e |otal:=To|tal+rLen|
|000018a0| 67 74 68 5b 69 5d 3b 0d | 20 20 72 55 73 65 72 31 |gth[i];.| rUser1|
|000018b0| 5b 72 43 6f 75 6e 74 5d | 3a 3d 54 6f 74 61 6c 3b |[rCount]|:=Total;|
|000018c0| 0d 20 20 55 70 64 61 74 | 65 52 65 73 75 6c 74 73 |. Updat|eResults|
|000018d0| 3b 0d 65 6e 64 3b 0d 0d | 0d 6d 61 63 72 6f 20 27 |;.end;..|.macro '|
|000018e0| 43 6f 75 6e 74 20 42 6c | 61 63 6b 20 61 6e 64 20 |Count Bl|ack and |
|000018f0| 57 68 69 74 65 20 50 69 | 78 65 6c 73 20 5b 42 5d |White Pi|xels [B]|
|00001900| 27 3b 0d 7b 0d 43 6f 75 | 6e 74 73 20 74 68 65 20 |';.{.Cou|nts the |
|00001910| 6e 75 6d 62 65 72 20 6f | 66 20 62 6c 61 63 6b 20 |number o|f black |
|00001920| 61 6e 64 20 77 68 69 74 | 65 20 70 69 78 65 6c 73 |and whit|e pixels|
|00001930| 20 69 6e 20 74 68 65 20 | 63 75 72 72 65 6e 74 0d | in the |current.|
|00001940| 73 65 6c 65 63 74 69 6f | 6e 20 61 6e 64 20 73 74 |selectio|n and st|
|00001950| 6f 72 65 73 20 74 68 65 | 20 63 6f 75 6e 74 73 20 |ores the| counts |
|00001960| 69 6e 20 74 68 65 20 55 | 73 65 72 31 20 61 6e 64 |in the U|ser1 and|
|00001970| 20 55 73 65 72 32 20 63 | 6f 6c 75 6d 6e 73 2e 0d | User2 c|olumns..|
|00001980| 7d 0d 62 65 67 69 6e 0d | 20 20 52 65 71 75 69 72 |}.begin.| Requir|
|00001990| 65 73 56 65 72 73 69 6f | 6e 28 31 2e 34 34 29 3b |esVersio|n(1.44);|
|000019a0| 0d 20 20 53 65 74 55 73 | 65 72 31 4c 61 62 65 6c |. SetUs|er1Label|
|000019b0| 28 27 42 6c 61 63 6b 27 | 29 3b 0d 20 20 53 65 74 |('Black'|);. Set|
|000019c0| 55 73 65 72 32 4c 61 62 | 65 6c 28 27 57 68 69 74 |User2Lab|el('Whit|
|000019d0| 65 27 29 3b 0d 20 20 4d | 65 61 73 75 72 65 3b 0d |e');. M|easure;.|
|000019e0| 20 20 72 55 73 65 72 31 | 5b 72 43 6f 75 6e 74 5d | rUser1|[rCount]|
|000019f0| 3a 3d 68 69 73 74 6f 67 | 72 61 6d 5b 32 35 35 5d |:=histog|ram[255]|
|00001a00| 3b 0d 20 20 72 55 73 65 | 72 32 5b 72 43 6f 75 6e |;. rUse|r2[rCoun|
|00001a10| 74 5d 3a 3d 68 69 73 74 | 6f 67 72 61 6d 5b 30 5d |t]:=hist|ogram[0]|
|00001a20| 3b 0d 20 20 55 70 64 61 | 74 65 52 65 73 75 6c 74 |;. Upda|teResult|
|00001a30| 73 3b 0d 65 6e 64 3b 0d | 0d 0d 6d 61 63 72 6f 20 |s;.end;.|..macro |
|00001a40| 27 43 6f 6d 70 75 74 65 | 20 50 65 72 63 65 6e 74 |'Compute| Percent|
|00001a50| 20 42 6c 61 63 6b 20 61 | 6e 64 20 57 68 69 74 65 | Black a|nd White|
|00001a60| 27 3b 0d 76 61 72 0d 20 | 20 6e 50 69 78 65 6c 73 |';.var. | nPixels|
|00001a70| 2c 6d 65 61 6e 2c 6d 6f | 64 65 2c 6d 69 6e 2c 6d |,mean,mo|de,min,m|
|00001a80| 61 78 3a 72 65 61 6c 3b | 0d 62 65 67 69 6e 0d 20 |ax:real;|.begin. |
|00001a90| 20 52 65 71 75 69 72 65 | 73 56 65 72 73 69 6f 6e | Require|sVersion|
|00001aa0| 28 31 2e 34 34 29 3b 0d | 20 20 53 65 74 55 73 65 |(1.44);.| SetUse|
|00001ab0| 72 31 4c 61 62 65 6c 28 | 27 42 6c 61 63 6b 27 29 |r1Label(|'Black')|
|00001ac0| 3b 0d 20 20 53 65 74 55 | 73 65 72 32 4c 61 62 65 |;. SetU|ser2Labe|
|00001ad0| 6c 28 27 57 68 69 74 65 | 27 29 3b 0d 20 20 4d 65 |l('White|');. Me|
|00001ae0| 61 73 75 72 65 3b 0d 20 | 20 47 65 74 52 65 73 75 |asure;. | GetResu|
|00001af0| 6c 74 73 28 6e 50 69 78 | 65 6c 73 2c 6d 65 61 6e |lts(nPix|els,mean|
|00001b00| 2c 6d 6f 64 65 2c 6d 69 | 6e 2c 6d 61 78 29 3b 0d |,mode,mi|n,max);.|
|00001b10| 20 20 72 55 73 65 72 31 | 5b 72 43 6f 75 6e 74 5d | rUser1|[rCount]|
|00001b20| 3a 3d 68 69 73 74 6f 67 | 72 61 6d 5b 32 35 35 5d |:=histog|ram[255]|
|00001b30| 2f 6e 50 69 78 65 6c 73 | 3b 0d 20 20 72 55 73 65 |/nPixels|;. rUse|
|00001b40| 72 32 5b 72 43 6f 75 6e | 74 5d 3a 3d 68 69 73 74 |r2[rCoun|t]:=hist|
|00001b50| 6f 67 72 61 6d 5b 30 5d | 2f 6e 50 69 78 65 6c 73 |ogram[0]|/nPixels|
|00001b60| 3b 0d 20 20 55 70 64 61 | 74 65 52 65 73 75 6c 74 |;. Upda|teResult|
|00001b70| 73 3b 0d 65 6e 64 3b 0d | 0d 0d 6d 61 63 72 6f 20 |s;.end;.|..macro |
|00001b80| 27 43 6f 6d 70 75 74 65 | 20 41 76 65 72 61 67 65 |'Compute| Average|
|00001b90| 20 61 6e 64 20 54 6f 74 | 61 6c 20 41 72 65 61 20 | and Tot|al Area |
|00001ba0| 5b 54 5d 27 3b 0d 7b 0d | 43 6f 6d 70 75 74 65 73 |[T]';.{.|Computes|
|00001bb0| 20 61 76 65 72 61 67 65 | 20 61 6e 64 20 61 63 63 | average| and acc|
|00001bc0| 75 6d 75 6c 61 74 65 64 | 20 61 72 65 61 20 61 6e |umulated| area an|
|00001bd0| 64 20 73 74 6f 72 65 73 | 20 0d 74 68 65 20 74 68 |d stores| .the th|
|00001be0| 65 6d 20 69 6e 20 74 68 | 65 20 4d 61 6a 6f 72 20 |em in th|e Major |
|00001bf0| 61 6e 64 20 4d 69 6e 6f | 72 20 41 78 69 73 20 63 |and Mino|r Axis c|
|00001c00| 6f 6c 75 6d 6e 73 2e 0d | 7d 0d 76 61 72 0d 20 20 |olumns..|}.var. |
|00001c10| 69 3a 69 6e 74 65 67 65 | 72 3b 0d 20 20 73 75 6d |i:intege|r;. sum|
|00001c20| 3a 72 65 61 6c 3b 0d 62 | 65 67 69 6e 0d 20 20 52 |:real;.b|egin. R|
|00001c30| 65 71 75 69 72 65 73 56 | 65 72 73 69 6f 6e 28 31 |equiresV|ersion(1|
|00001c40| 2e 34 34 29 3b 0d 20 20 | 53 65 74 55 73 65 72 31 |.44);. |SetUser1|
|00001c50| 4c 61 62 65 6c 28 27 41 | 76 67 27 29 3b 0d 20 20 |Label('A|vg');. |
|00001c60| 53 65 74 55 73 65 72 32 | 4c 61 62 65 6c 28 27 54 |SetUser2|Label('T|
|00001c70| 6f 74 61 6c 27 29 3b 0d | 20 20 53 65 74 4f 70 74 |otal');.| SetOpt|
|00001c80| 69 6f 6e 73 28 27 41 72 | 65 61 3b 20 55 73 65 72 |ions('Ar|ea; User|
|00001c90| 31 3b 20 55 73 65 72 32 | 27 29 3b 0d 20 20 4d 65 |1; User2|');. Me|
|00001ca0| 61 73 75 72 65 3b 0d 20 | 20 73 75 6d 3a 3d 30 3b |asure;. | sum:=0;|
|00001cb0| 0d 20 20 66 6f 72 20 69 | 3a 3d 31 20 74 6f 20 72 |. for i|:=1 to r|
|00001cc0| 43 6f 75 6e 74 20 64 6f | 20 73 75 6d 3a 3d 73 75 |Count do| sum:=su|
|00001cd0| 6d 2b 72 41 72 65 61 5b | 69 5d 3b 0d 20 20 72 55 |m+rArea[|i];. rU|
|00001ce0| 73 65 72 31 5b 72 43 6f | 75 6e 74 5d 3a 3d 73 75 |ser1[rCo|unt]:=su|
|00001cf0| 6d 2f 72 43 6f 75 6e 74 | 3b 0d 20 20 72 55 73 65 |m/rCount|;. rUse|
|00001d00| 72 32 5b 72 43 6f 75 6e | 74 5d 3a 3d 73 75 6d 3b |r2[rCoun|t]:=sum;|
|00001d10| 0d 20 20 55 70 64 61 74 | 65 52 65 73 75 6c 74 73 |. Updat|eResults|
|00001d20| 3b 0d 65 6e 64 3b 0d 0d | 0d 6d 61 63 72 6f 20 27 |;.end;..|.macro '|
|00001d30| 4d 65 61 73 75 72 65 20 | 43 69 72 63 75 6c 61 72 |Measure |Circular|
|00001d40| 69 74 79 27 3b 0d 62 65 | 67 69 6e 0d 20 20 53 65 |ity';.be|gin. Se|
|00001d50| 74 55 73 65 72 31 4c 61 | 62 65 6c 28 27 53 68 61 |tUser1La|bel('Sha|
|00001d60| 70 65 27 29 3b 0d 20 20 | 4d 65 61 73 75 72 65 3b |pe');. |Measure;|
|00001d70| 0d 20 20 72 55 73 65 72 | 31 5b 72 43 6f 75 6e 74 |. rUser|1[rCount|
|00001d80| 5d 3a 3d 34 2a 33 2e 31 | 34 31 35 39 32 36 35 2a |]:=4*3.1|4159265*|
|00001d90| 28 72 41 72 65 61 5b 72 | 43 6f 75 6e 74 5d 2f 73 |(rArea[r|Count]/s|
|00001da0| 71 72 28 72 4c 65 6e 67 | 74 68 5b 72 43 6f 75 6e |qr(rLeng|th[rCoun|
|00001db0| 74 5d 29 29 3b 0d 20 20 | 55 70 64 61 74 65 52 65 |t]));. |UpdateRe|
|00001dc0| 73 75 6c 74 73 3b 0d 65 | 6e 64 3b 0d 0d 0d 6d 61 |sults;.e|nd;...ma|
|00001dd0| 63 72 6f 20 27 4d 65 61 | 73 75 72 65 20 4d 65 61 |cro 'Mea|sure Mea|
|00001de0| 6e 20 2a 20 41 72 65 61 | 27 3b 0d 62 65 67 69 6e |n * Area|';.begin|
|00001df0| 0d 20 20 53 65 74 55 73 | 65 72 31 4c 61 62 65 6c |. SetUs|er1Label|
|00001e00| 28 27 4d 65 61 6e 2a 41 | 72 65 61 27 29 3b 0d 20 |('Mean*A|rea');. |
|00001e10| 20 4d 65 61 73 75 72 65 | 3b 0d 20 20 72 55 73 65 | Measure|;. rUse|
|00001e20| 72 31 5b 72 43 6f 75 6e | 74 5d 3a 3d 72 4d 65 61 |r1[rCoun|t]:=rMea|
|00001e30| 6e 5b 72 43 6f 75 6e 74 | 5d 2a 72 41 72 65 61 5b |n[rCount|]*rArea[|
|00001e40| 72 43 6f 75 6e 74 5d 3b | 0d 20 20 55 70 64 61 74 |rCount];|. Updat|
|00001e50| 65 52 65 73 75 6c 74 73 | 3b 0d 65 6e 64 3b 0d 0d |eResults|;.end;..|
|00001e60| 0d 6d 61 63 72 6f 20 27 | 46 69 74 20 20 45 6c 6c |.macro '|Fit Ell|
|00001e70| 69 70 73 65 20 61 6e 64 | 20 44 72 61 77 20 69 6e |ipse and| Draw in|
|00001e80| 20 57 68 69 74 65 27 3b | 0d 76 61 72 0d 20 20 6c | White';|.var. l|
|00001e90| 65 66 74 2c 74 6f 70 2c | 77 69 64 74 68 2c 68 65 |eft,top,|width,he|
|00001ea0| 69 67 68 74 3a 72 65 61 | 6c 3b 0d 62 65 67 69 6e |ight:rea|l;.begin|
|00001eb0| 0d 20 20 47 65 74 52 6f | 69 28 6c 65 66 74 2c 74 |. GetRo|i(left,t|
|00001ec0| 6f 70 2c 77 69 64 74 68 | 2c 68 65 69 67 68 74 29 |op,width|,height)|
|00001ed0| 3b 0d 20 20 69 66 20 77 | 69 64 74 68 3d 30 20 74 |;. if w|idth=0 t|
|00001ee0| 68 65 6e 20 62 65 67 69 | 6e 0d 20 20 20 20 50 75 |hen begi|n. Pu|
|00001ef0| 74 4d 65 73 73 61 67 65 | 28 27 54 68 69 73 20 6d |tMessage|('This m|
|00001f00| 61 63 72 6f 20 72 65 71 | 75 69 72 65 73 20 61 20 |acro req|uires a |
|00001f10| 73 65 6c 65 63 74 69 6f | 6e 2e 27 29 3b 0d 20 20 |selectio|n.');. |
|00001f20| 20 20 65 78 69 74 3b 0d | 20 20 65 6e 64 3b 0d 20 | exit;.| end;. |
|00001f30| 20 53 65 74 4f 70 74 69 | 6f 6e 73 28 27 41 72 65 | SetOpti|ons('Are|
|00001f40| 61 3b 20 4d 65 61 6e 3b | 20 58 2d 59 20 43 65 6e |a; Mean;| X-Y Cen|
|00001f50| 74 65 72 27 29 3b 0d 20 | 20 4d 65 61 73 75 72 65 |ter');. | Measure|
|00001f60| 3b 0d 20 20 53 65 74 4f | 70 74 69 6f 6e 3b 20 4d |;. SetO|ption; M|
|00001f70| 61 72 6b 53 65 6c 65 63 | 74 69 6f 6e 3b 0d 20 20 |arkSelec|tion;. |
|00001f80| 4b 69 6c 6c 52 6f 69 3b | 0d 20 20 53 65 6c 65 63 |KillRoi;|. Selec|
|00001f90| 74 41 6c 6c 3b 0d 20 20 | 4b 69 6c 6c 52 6f 69 3b |tAll;. |KillRoi;|
|00001fa0| 0d 20 65 6e 64 3b 0d 0d | 0d 6d 61 63 72 6f 20 27 |. end;..|.macro '|
|00001fb0| 44 72 61 77 20 58 59 20 | 43 65 6e 74 65 72 27 3b |Draw XY |Center';|
|00001fc0| 0d 76 61 72 0d 20 20 6c | 65 66 74 2c 74 6f 70 2c |.var. l|eft,top,|
|00001fd0| 77 69 64 74 68 2c 68 65 | 69 67 68 74 2c 78 2c 79 |width,he|ight,x,y|
|00001fe0| 3a 72 65 61 6c 3b 0d 62 | 65 67 69 6e 0d 20 20 52 |:real;.b|egin. R|
|00001ff0| 65 71 75 69 72 65 73 56 | 65 72 73 69 6f 6e 28 31 |equiresV|ersion(1|
|00002000| 2e 34 34 29 3b 0d 20 20 | 47 65 74 52 6f 69 28 6c |.44);. |GetRoi(l|
|00002010| 65 66 74 2c 74 6f 70 2c | 77 69 64 74 68 2c 68 65 |eft,top,|width,he|
|00002020| 69 67 68 74 29 3b 0d 20 | 20 69 66 20 77 69 64 74 |ight);. | if widt|
|00002030| 68 3d 30 20 74 68 65 6e | 20 62 65 67 69 6e 0d 20 |h=0 then| begin. |
|00002040| 20 20 20 50 75 74 4d 65 | 73 73 61 67 65 28 27 54 | PutMe|ssage('T|
|00002050| 68 69 73 20 6d 61 63 72 | 6f 20 72 65 71 75 69 72 |his macr|o requir|
|00002060| 65 73 20 61 20 73 65 6c | 65 63 74 69 6f 6e 2e 27 |es a sel|ection.'|
|00002070| 29 3b 0d 20 20 20 20 65 | 78 69 74 3b 0d 20 20 65 |);. e|xit;. e|
|00002080| 6e 64 3b 0d 20 20 53 61 | 76 65 53 74 61 74 65 3b |nd;. Sa|veState;|
|00002090| 20 7b 49 6e 76 65 72 74 | 20 59 20 73 74 61 74 75 | {Invert| Y statu|
|000020a0| 73 20 73 61 76 65 64 20 | 73 74 61 72 74 69 6e 67 |s saved |starting|
|000020b0| 20 77 69 74 68 20 56 31 | 2e 34 34 62 32 31 7d 0d | with V1|.44b21}.|
|000020c0| 20 20 49 6e 76 65 72 74 | 59 28 66 61 6c 73 65 29 | Invert|Y(false)|
|000020d0| 3b 0d 20 20 53 65 74 46 | 6f 72 65 67 72 6f 75 6e |;. SetF|oregroun|
|000020e0| 64 43 6f 6c 6f 72 28 32 | 35 35 29 3b 20 7b 62 6c |dColor(2|55); {bl|
|000020f0| 61 63 6b 7d 0d 20 20 53 | 65 74 4f 70 74 69 6f 6e |ack}. S|etOption|
|00002100| 73 28 27 41 72 65 61 3b | 20 4d 65 61 6e 3b 20 58 |s('Area;| Mean; X|
|00002110| 2d 59 20 43 65 6e 74 65 | 72 27 29 3b 20 7b 58 59 |-Y Cente|r'); {XY|
|00002120| 20 43 65 6e 74 65 72 7d | 0d 20 20 4d 65 61 73 75 | Center}|. Measu|
|00002130| 72 65 3b 0d 20 20 4b 69 | 6c 6c 52 6f 69 3b 0d 20 |re;. Ki|llRoi;. |
|00002140| 20 78 3a 3d 72 58 5b 72 | 43 6f 75 6e 74 5d 3b 0d | x:=rX[r|Count];.|
|00002150| 20 20 79 3a 3d 72 59 5b | 72 43 6f 75 6e 74 5d 3b | y:=rY[|rCount];|
|00002160| 0d 20 20 4d 6f 76 65 54 | 6f 28 78 2d 35 2c 79 29 |. MoveT|o(x-5,y)|
|00002170| 3b 0d 20 20 4c 69 6e 65 | 54 6f 28 78 2b 35 2c 79 |;. Line|To(x+5,y|
|00002180| 29 3b 0d 20 20 4d 6f 76 | 65 54 6f 28 78 2c 79 2d |);. Mov|eTo(x,y-|
|00002190| 35 29 3b 0d 20 20 4c 69 | 6e 65 54 6f 28 78 2c 79 |5);. Li|neTo(x,y|
|000021a0| 2b 35 29 3b 0d 20 20 52 | 65 73 74 6f 72 65 53 74 |+5);. R|estoreSt|
|000021b0| 61 74 65 3b 0d 65 6e 64 | 3b 0d 0d 0d 6d 61 63 72 |ate;.end|;...macr|
|000021c0| 6f 20 27 50 6c 6f 74 20 | 52 61 64 69 61 6c 20 44 |o 'Plot |Radial D|
|000021d0| 65 6e 73 69 74 79 20 50 | 72 6f 66 69 6c 65 73 20 |ensity P|rofiles |
|000021e0| 5b 52 5d 27 3b 0d 76 61 | 72 0d 20 20 78 31 2c 79 |[R]';.va|r. x1,y|
|000021f0| 31 2c 78 32 2c 79 32 2c | 70 69 2c 61 6e 67 6c 65 |1,x2,y2,|pi,angle|
|00002200| 2c 64 65 6c 74 61 3a 72 | 65 61 6c 3b 0d 20 20 4c |,delta:r|eal;. L|
|00002210| 69 6e 65 57 69 64 74 68 | 2c 69 2c 6e 4c 69 6e 65 |ineWidth|,i,nLine|
|00002220| 73 2c 72 61 64 69 75 73 | 2c 50 6c 6f 74 57 69 64 |s,radius|,PlotWid|
|00002230| 74 68 2c 50 6c 6f 74 48 | 65 69 67 68 74 3a 69 6e |th,PlotH|eight:in|
|00002240| 74 65 67 65 72 3b 0d 20 | 20 4d 69 6e 50 6c 6f 74 |teger;. | MinPlot|
|00002250| 57 69 64 74 68 2c 68 4d | 61 72 67 69 6e 2c 76 4d |Width,hM|argin,vM|
|00002260| 61 72 67 69 6e 2c 50 6c | 6f 74 4c 65 66 74 2c 50 |argin,Pl|otLeft,P|
|00002270| 6c 6f 74 54 6f 70 3a 69 | 6e 74 65 67 65 72 3b 0d |lotTop:i|nteger;.|
|00002280| 20 20 4c 65 66 74 4d 61 | 72 67 69 6e 2c 52 69 67 | LeftMa|rgin,Rig|
|00002290| 68 74 4d 61 72 67 69 6e | 2c 54 6f 70 4d 61 72 67 |htMargin|,TopMarg|
|000022a0| 69 6e 2c 42 6f 74 74 6f | 6d 4d 61 72 67 69 6e 3a |in,Botto|mMargin:|
|000022b0| 69 6e 74 65 67 65 72 3b | 0d 20 20 49 6d 61 67 65 |integer;|. Image|
|000022c0| 57 69 6e 64 6f 77 2c 50 | 6c 6f 74 57 69 6e 64 6f |Window,P|lotWindo|
|000022d0| 77 3a 69 6e 74 65 67 65 | 72 3b 0d 20 20 6e 50 69 |w:intege|r;. nPi|
|000022e0| 78 65 6c 73 2c 6d 65 61 | 6e 2c 6d 6f 64 65 2c 6d |xels,mea|n,mode,m|
|000022f0| 69 6e 2c 6d 61 78 3a 72 | 65 61 6c 3b 0d 62 65 67 |in,max:r|eal;.beg|
|00002300| 69 6e 0d 20 20 52 65 71 | 75 69 72 65 73 56 65 72 |in. Req|uiresVer|
|00002310| 73 69 6f 6e 28 31 2e 34 | 35 29 3b 0d 20 20 53 61 |sion(1.4|5);. Sa|
|00002320| 76 65 53 74 61 74 65 3b | 0d 20 20 47 65 74 4c 69 |veState;|. GetLi|
|00002330| 6e 65 28 78 31 2c 79 31 | 2c 78 32 2c 79 32 2c 4c |ne(x1,y1|,x2,y2,L|
|00002340| 69 6e 65 57 69 64 74 68 | 29 0d 20 20 69 66 20 78 |ineWidth|). if x|
|00002350| 31 3c 30 20 74 68 65 6e | 20 62 65 67 69 6e 0d 20 |1<0 then| begin. |
|00002360| 20 20 20 50 75 74 4d 65 | 73 73 61 67 65 28 27 50 | PutMe|ssage('P|
|00002370| 6c 65 61 73 65 20 73 65 | 6c 65 63 74 20 61 20 70 |lease se|lect a p|
|00002380| 6f 69 6e 74 20 62 79 20 | 63 6c 69 63 6b 69 6e 67 |oint by |clicking|
|00002390| 20 77 69 74 68 20 74 68 | 65 20 6c 69 6e 65 20 74 | with th|e line t|
|000023a0| 6f 6f 6c 2e 27 29 3b 0d | 20 20 20 20 65 78 69 74 |ool.');.| exit|
|000023b0| 3b 0d 20 20 65 6e 64 3b | 0d 20 20 72 61 64 69 75 |;. end;|. radiu|
|000023c0| 73 3a 3d 32 30 3b 0d 20 | 20 6e 4c 69 6e 65 73 3a |s:=20;. | nLines:|
|000023d0| 3d 38 3b 0d 20 20 4d 69 | 6e 50 6c 6f 74 57 69 64 |=8;. Mi|nPlotWid|
|000023e0| 74 68 3a 3d 31 34 30 3b | 0d 20 20 70 69 3a 3d 33 |th:=140;|. pi:=3|
|000023f0| 2e 31 34 31 35 39 3b 0d | 20 20 64 65 6c 74 61 3a |.14159;.| delta:|
|00002400| 3d 32 2e 30 2a 70 69 2f | 6e 4c 69 6e 65 73 3b 0d |=2.0*pi/|nLines;.|
|00002410| 20 20 61 6e 67 6c 65 3a | 3d 30 2e 30 3b 0d 20 20 | angle:|=0.0;. |
|00002420| 50 6c 6f 74 57 69 64 74 | 68 3a 3d 72 61 64 69 75 |PlotWidt|h:=radiu|
|00002430| 73 3b 0d 20 20 69 66 20 | 50 6c 6f 74 57 69 64 74 |s;. if |PlotWidt|
|00002440| 68 3c 4d 69 6e 50 6c 6f | 74 57 69 64 74 68 20 74 |h<MinPlo|tWidth t|
|00002450| 68 65 6e 20 50 6c 6f 74 | 57 69 64 74 68 3a 3d 4d |hen Plot|Width:=M|
|00002460| 69 6e 50 6c 6f 74 57 69 | 64 74 68 3b 0d 20 20 50 |inPlotWi|dth;. P|
|00002470| 6c 6f 74 48 65 69 67 68 | 74 3a 3d 30 2e 34 2a 50 |lotHeigh|t:=0.4*P|
|00002480| 6c 6f 74 57 69 64 74 68 | 3b 0d 20 20 53 65 74 50 |lotWidth|;. SetP|
|00002490| 6c 6f 74 53 69 7a 65 28 | 50 6c 6f 74 57 69 64 74 |lotSize(|PlotWidt|
|000024a0| 68 2c 50 6c 6f 74 48 65 | 69 67 68 74 29 3b 0d 20 |h,PlotHe|ight);. |
|000024b0| 20 4d 61 6b 65 4f 76 61 | 6c 52 6f 69 28 78 31 2d | MakeOva|lRoi(x1-|
|000024c0| 72 61 64 69 75 73 2c 79 | 31 2d 72 61 64 69 75 73 |radius,y|1-radius|
|000024d0| 2c 72 61 64 69 75 73 2a | 32 2c 72 61 64 69 75 73 |,radius*|2,radius|
|000024e0| 2a 32 29 3b 0d 20 20 4d | 65 61 73 75 72 65 3b 0d |*2);. M|easure;.|
|000024f0| 20 20 47 65 74 52 65 73 | 75 6c 74 73 28 6e 50 69 | GetRes|ults(nPi|
|00002500| 78 65 6c 73 2c 6d 65 61 | 6e 2c 6d 6f 64 65 2c 6d |xels,mea|n,mode,m|
|00002510| 69 6e 2c 6d 61 78 29 3b | 0d 20 20 6d 69 6e 3a 3d |in,max);|. min:=|
|00002520| 6d 69 6e 2d 31 30 3b 0d | 20 20 69 66 20 6d 69 6e |min-10;.| if min|
|00002530| 3c 30 20 74 68 65 6e 20 | 6d 69 6e 3a 3d 30 3b 0d |<0 then |min:=0;.|
|00002540| 20 20 6d 61 78 3a 3d 6d | 61 78 2b 31 30 3b 0d 20 | max:=m|ax+10;. |
|00002550| 20 69 66 20 6d 61 78 3e | 32 35 35 20 74 68 65 6e | if max>|255 then|
|00002560| 20 6d 61 78 3a 3d 32 35 | 35 3b 0d 20 20 53 65 74 | max:=25|5;. Set|
|00002570| 50 6c 6f 74 53 63 61 6c | 65 28 63 56 61 6c 75 65 |PlotScal|e(cValue|
|00002580| 28 6d 69 6e 29 2c 63 56 | 61 6c 75 65 28 6d 61 78 |(min),cV|alue(max|
|00002590| 29 29 3b 0d 20 20 53 65 | 74 50 6c 6f 74 4c 61 62 |));. Se|tPlotLab|
|000025a0| 65 6c 73 28 66 61 6c 73 | 65 29 3b 0d 20 20 68 4d |els(fals|e);. hM|
|000025b0| 61 72 67 69 6e 3a 3d 35 | 3b 0d 20 20 76 4d 61 72 |argin:=5|;. vMar|
|000025c0| 67 69 6e 3a 3d 35 3b 0d | 20 20 69 66 20 43 61 6c |gin:=5;.| if Cal|
|000025d0| 69 62 72 61 74 65 64 0d | 20 20 20 20 74 68 65 6e |ibrated.| then|
|000025e0| 20 4c 65 66 74 4d 61 72 | 67 69 6e 3a 3d 33 35 0d | LeftMar|gin:=35.|
|000025f0| 20 20 20 20 65 6c 73 65 | 20 4c 65 66 74 4d 61 72 | else| LeftMar|
|00002600| 67 69 6e 3a 3d 32 35 3b | 0d 20 20 54 6f 70 4d 61 |gin:=25;|. TopMa|
|00002610| 72 67 69 6e 3a 3d 31 30 | 3b 0d 20 20 52 69 67 68 |rgin:=10|;. Righ|
|00002620| 74 4d 61 72 67 69 6e 3a | 3d 31 30 3b 0d 20 20 42 |tMargin:|=10;. B|
|00002630| 6f 74 74 6f 6d 4d 61 72 | 67 69 6e 3a 3d 32 30 3b |ottomMar|gin:=20;|
|00002640| 0d 20 20 50 6c 6f 74 4c | 65 66 74 3a 3d 68 4d 61 |. PlotL|eft:=hMa|
|00002650| 72 67 69 6e 2d 4c 65 66 | 74 4d 61 72 67 69 6e 3b |rgin-Lef|tMargin;|
|00002660| 0d 20 20 50 6c 6f 74 54 | 6f 70 3a 3d 76 4d 61 72 |. PlotT|op:=vMar|
|00002670| 67 69 6e 2d 54 6f 70 4d | 61 72 67 69 6e 3b 0d 20 |gin-TopM|argin;. |
|00002680| 20 53 65 74 4e 65 77 53 | 69 7a 65 28 50 6c 6f 74 | SetNewS|ize(Plot|
|00002690| 57 69 64 74 68 2b 32 2a | 68 4d 61 72 67 69 6e 2c |Width+2*|hMargin,|
|000026a0| 50 6c 6f 74 48 65 69 67 | 68 74 2a 6e 4c 69 6e 65 |PlotHeig|ht*nLine|
|000026b0| 73 29 3b 0d 20 20 53 65 | 74 46 6f 72 65 67 72 6f |s);. Se|tForegro|
|000026c0| 75 6e 64 43 6f 6c 6f 72 | 28 32 35 35 29 3b 0d 20 |undColor|(255);. |
|000026d0| 20 53 65 74 42 61 63 6b | 67 72 6f 75 6e 64 43 6f | SetBack|groundCo|
|000026e0| 6c 6f 72 28 30 29 3b 0d | 20 20 49 6d 61 67 65 57 |lor(0);.| ImageW|
|000026f0| 69 6e 64 6f 77 3a 3d 50 | 69 63 4e 75 6d 62 65 72 |indow:=P|icNumber|
|00002700| 3b 0d 20 20 4d 61 6b 65 | 4e 65 77 57 69 6e 64 6f |;. Make|NewWindo|
|00002710| 77 28 27 50 6c 6f 74 73 | 27 29 3b 0d 20 20 50 6c |w('Plots|');. Pl|
|00002720| 6f 74 57 69 6e 64 6f 77 | 3a 3d 50 69 63 4e 75 6d |otWindow|:=PicNum|
|00002730| 62 65 72 3b 0d 20 20 53 | 65 6c 65 63 74 50 69 63 |ber;. S|electPic|
|00002740| 28 49 6d 61 67 65 57 69 | 6e 64 6f 77 29 3b 0d 20 |(ImageWi|ndow);. |
|00002750| 20 66 6f 72 20 69 3a 3d | 31 20 54 4f 20 6e 4c 69 | for i:=|1 TO nLi|
|00002760| 6e 65 73 20 64 6f 20 62 | 65 67 69 6e 0d 20 20 20 |nes do b|egin. |
|00002770| 20 78 32 3a 3d 78 31 2b | 72 6f 75 6e 64 28 72 61 | x2:=x1+|round(ra|
|00002780| 64 69 75 73 2a 63 6f 73 | 28 61 6e 67 6c 65 29 29 |dius*cos|(angle))|
|00002790| 3b 0d 20 20 20 20 79 32 | 3a 3d 79 31 2b 72 6f 75 |;. y2|:=y1+rou|
|000027a0| 6e 64 28 72 61 64 69 75 | 73 2a 73 69 6e 28 61 6e |nd(radiu|s*sin(an|
|000027b0| 67 6c 65 29 29 3b 0d 20 | 20 20 20 4d 61 6b 65 4c |gle));. | MakeL|
|000027c0| 69 6e 65 52 6f 69 28 78 | 31 2c 79 31 2c 78 32 2c |ineRoi(x|1,y1,x2,|
|000027d0| 79 32 29 3b 0d 20 20 20 | 20 50 6c 6f 74 50 72 6f |y2);. | PlotPro|
|000027e0| 66 69 6c 65 3b 0d 20 20 | 20 20 43 6f 70 79 3b 0d |file;. | Copy;.|
|000027f0| 20 20 20 20 53 65 6c 65 | 63 74 50 69 63 28 50 6c | Sele|ctPic(Pl|
|00002800| 6f 74 57 69 6e 64 6f 77 | 29 3b 0d 20 20 20 20 4d |otWindow|);. M|
|00002810| 61 6b 65 52 6f 69 28 50 | 6c 6f 74 4c 65 66 74 2c |akeRoi(P|lotLeft,|
|00002820| 50 6c 6f 74 54 6f 70 2c | 50 6c 6f 74 57 69 64 74 |PlotTop,|PlotWidt|
|00002830| 68 2b 4c 65 66 74 4d 61 | 72 67 69 6e 2b 52 69 67 |h+LeftMa|rgin+Rig|
|00002840| 68 74 4d 61 72 67 69 6e | 2c 0d 20 20 20 20 20 20 |htMargin|,. |
|00002850| 20 20 20 20 50 6c 6f 74 | 48 65 69 67 68 74 2b 54 | Plot|Height+T|
|00002860| 6f 70 4d 61 72 67 69 6e | 2b 42 6f 74 74 6f 6d 4d |opMargin|+BottomM|
|00002870| 61 72 67 69 6e 29 3b 0d | 20 20 20 20 50 61 73 74 |argin);.| Past|
|00002880| 65 3b 0d 20 20 20 20 44 | 6f 4f 72 3b 0d 20 20 20 |e;. D|oOr;. |
|00002890| 20 50 6c 6f 74 54 6f 70 | 3a 3d 50 6c 6f 74 54 6f | PlotTop|:=PlotTo|
|000028a0| 70 2b 50 6c 6f 74 48 65 | 69 67 68 74 2d 31 3b 0d |p+PlotHe|ight-1;.|
|000028b0| 20 20 20 20 53 65 6c 65 | 63 74 50 69 63 28 49 6d | Sele|ctPic(Im|
|000028c0| 61 67 65 57 69 6e 64 6f | 77 29 3b 0d 20 20 20 20 |ageWindo|w);. |
|000028d0| 61 6e 67 6c 65 3a 3d 61 | 6e 67 6c 65 2b 64 65 6c |angle:=a|ngle+del|
|000028e0| 74 61 3b 0d 20 20 65 6e | 64 3b 0d 20 20 52 65 73 |ta;. en|d;. Res|
|000028f0| 74 6f 72 65 53 74 61 74 | 65 3b 0d 65 6e 64 3b 0d |toreStat|e;.end;.|
|00002900| 0d 0d 6d 61 63 72 6f 20 | 27 43 69 72 63 75 6c 61 |..macro |'Circula|
|00002910| 72 20 50 72 6f 66 69 6c | 65 20 50 6c 6f 74 20 5b |r Profil|e Plot [|
|00002920| 43 5d 27 3b 0d 76 61 72 | 0d 20 20 72 61 64 69 75 |C]';.var|. radiu|
|00002930| 73 2c 70 69 2c 61 6e 67 | 6c 65 2c 64 78 2c 64 79 |s,pi,ang|le,dx,dy|
|00002940| 2c 64 65 6c 74 61 3a 72 | 65 61 6c 3b 0d 20 20 78 |,delta:r|eal;. x|
|00002950| 31 2c 79 31 2c 78 32 2c | 79 32 3a 72 65 61 6c 3b |1,y1,x2,|y2:real;|
|00002960| 0d 20 20 6e 70 6f 69 6e | 74 73 2c 69 2c 76 61 6c |. npoin|ts,i,val|
|00002970| 75 65 2c 4c 69 6e 65 57 | 69 64 74 68 2c 78 2c 79 |ue,LineW|idth,x,y|
|00002980| 2c 70 78 3a 69 6e 74 65 | 67 65 72 3b 0d 62 65 67 |,px:inte|ger;.beg|
|00002990| 69 6e 0d 20 20 47 65 74 | 4c 69 6e 65 28 78 31 2c |in. Get|Line(x1,|
|000029a0| 79 31 2c 78 32 2c 79 32 | 2c 4c 69 6e 65 57 69 64 |y1,x2,y2|,LineWid|
|000029b0| 74 68 29 0d 20 20 69 66 | 20 78 31 3c 30 20 74 68 |th). if| x1<0 th|
|000029c0| 65 6e 20 62 65 67 69 6e | 0d 20 20 20 20 50 75 74 |en begin|. Put|
|000029d0| 4d 65 73 73 61 67 65 28 | 27 50 6c 65 61 73 65 20 |Message(|'Please |
|000029e0| 73 65 6c 65 63 74 20 61 | 20 70 6f 69 6e 74 20 62 |select a| point b|
|000029f0| 79 20 63 6c 69 63 6b 69 | 6e 67 20 77 69 74 68 20 |y clicki|ng with |
|00002a00| 74 68 65 20 6c 69 6e 65 | 20 74 6f 6f 6c 2e 27 29 |the line| tool.')|
|00002a10| 3b 0d 20 20 20 20 65 78 | 69 74 3b 0d 20 20 65 6e |;. ex|it;. en|
|00002a20| 64 3b 0d 20 20 78 3a 3d | 78 31 2b 28 78 32 2d 78 |d;. x:=|x1+(x2-x|
|00002a30| 31 29 2f 32 3b 0d 20 20 | 79 3a 3d 79 31 2b 28 79 |1)/2;. |y:=y1+(y|
|00002a40| 32 2d 79 31 29 2f 32 3b | 0d 20 20 72 61 64 69 75 |2-y1)/2;|. radiu|
|00002a50| 73 3a 3d 73 71 72 74 28 | 73 71 72 28 78 32 2d 78 |s:=sqrt(|sqr(x2-x|
|00002a60| 31 29 2b 73 71 72 28 79 | 32 2d 79 31 29 29 2f 32 |1)+sqr(y|2-y1))/2|
|00002a70| 3b 0d 20 20 69 66 20 72 | 61 64 69 75 73 3c 33 20 |;. if r|adius<3 |
|00002a80| 74 68 65 6e 20 62 65 67 | 69 6e 0d 20 20 20 20 50 |then beg|in. P|
|00002a90| 75 74 4d 65 73 73 61 67 | 65 28 27 54 68 65 20 6c |utMessag|e('The l|
|00002aa0| 69 6e 65 20 73 65 6c 65 | 63 74 69 6f 6e 20 6d 75 |ine sele|ction mu|
|00002ab0| 73 74 20 62 65 20 6c 6f | 6e 67 65 72 20 74 68 61 |st be lo|nger tha|
|00002ac0| 6e 20 35 20 70 69 78 65 | 6c 73 2e 27 29 3b 0d 20 |n 5 pixe|ls.');. |
|00002ad0| 20 20 20 65 78 69 74 3b | 0d 20 20 65 6e 64 3b 0d | exit;|. end;.|
|00002ae0| 20 20 6e 70 6f 69 6e 74 | 73 3a 3d 72 61 64 69 75 | npoint|s:=radiu|
|00002af0| 73 2a 32 3b 0d 20 20 70 | 69 3a 3d 33 2e 31 34 31 |s*2;. p|i:=3.141|
|00002b00| 35 39 3b 0d 20 20 64 65 | 6c 74 61 3a 3d 32 2e 30 |59;. de|lta:=2.0|
|00002b10| 2a 70 69 2f 6e 70 6f 69 | 6e 74 73 3b 0d 20 20 61 |*pi/npoi|nts;. a|
|00002b20| 6e 67 6c 65 3a 3d 30 2e | 30 3b 0d 20 20 70 78 3a |ngle:=0.|0;. px:|
|00002b30| 3d 30 3b 0d 20 20 66 6f | 72 20 69 3a 3d 31 20 54 |=0;. fo|r i:=1 T|
|00002b40| 4f 20 6e 70 6f 69 6e 74 | 73 20 64 6f 20 62 65 67 |O npoint|s do beg|
|00002b50| 69 6e 0d 20 20 20 20 64 | 78 3a 3d 72 6f 75 6e 64 |in. d|x:=round|
|00002b60| 28 72 61 64 69 75 73 2a | 63 6f 73 28 61 6e 67 6c |(radius*|cos(angl|
|00002b70| 65 29 29 3b 0d 20 20 20 | 20 64 79 3a 3d 72 6f 75 |e));. | dy:=rou|
|00002b80| 6e 64 28 72 61 64 69 75 | 73 2a 73 69 6e 28 61 6e |nd(radiu|s*sin(an|
|00002b90| 67 6c 65 29 29 3b 0d 20 | 20 20 20 76 61 6c 75 65 |gle));. | value|
|00002ba0| 3a 3d 47 65 74 50 69 78 | 65 6c 28 78 2b 64 78 2c |:=GetPix|el(x+dx,|
|00002bb0| 79 2b 64 79 29 3b 0d 20 | 20 20 20 50 75 74 50 69 |y+dy);. | PutPi|
|00002bc0| 78 65 6c 28 78 2b 64 78 | 2c 79 2b 64 79 2c 32 35 |xel(x+dx|,y+dy,25|
|00002bd0| 35 29 3b 0d 20 20 20 20 | 50 75 74 50 69 78 65 6c |5);. |PutPixel|
|00002be0| 28 70 78 2c 30 2c 76 61 | 6c 75 65 29 3b 0d 20 20 |(px,0,va|lue);. |
|00002bf0| 20 20 70 78 3a 3d 70 78 | 2b 31 3b 0d 20 20 20 20 | px:=px|+1;. |
|00002c00| 61 6e 67 6c 65 3a 3d 61 | 6e 67 6c 65 2b 64 65 6c |angle:=a|ngle+del|
|00002c10| 74 61 3b 0d 20 20 65 6e | 64 3b 0d 20 20 4d 61 6b |ta;. en|d;. Mak|
|00002c20| 65 4c 69 6e 65 52 6f 69 | 28 30 2c 30 2c 6e 70 6f |eLineRoi|(0,0,npo|
|00002c30| 69 6e 74 73 2c 30 29 3b | 0d 20 20 50 6c 6f 74 50 |ints,0);|. PlotP|
|00002c40| 72 6f 66 69 6c 65 3b 0d | 20 20 4b 69 6c 6c 52 6f |rofile;.| KillRo|
|00002c50| 69 3b 0d 65 6e 64 3b 0d | 0d 0d 6d 61 63 72 6f 20 |i;.end;.|..macro |
|00002c60| 27 43 6f 6d 70 75 74 65 | 20 53 70 61 74 69 61 6c |'Compute| Spatial|
|00002c70| 20 53 63 61 6c 65 27 3b | 0d 76 61 72 0d 20 20 73 | Scale';|.var. s|
|00002c80| 63 61 6c 65 3a 72 65 61 | 6c 3b 0d 62 65 67 69 6e |cale:rea|l;.begin|
|00002c90| 0d 20 20 4d 61 6b 65 4c | 69 6e 65 52 6f 69 28 30 |. MakeL|ineRoi(0|
|00002ca0| 2c 30 2c 31 30 30 2c 30 | 29 3b 0d 20 20 4d 65 61 |,0,100,0|);. Mea|
|00002cb0| 73 75 72 65 3b 0d 20 20 | 4b 69 6c 6c 52 6f 69 3b |sure;. |KillRoi;|
|00002cc0| 0d 20 20 53 63 61 6c 65 | 3a 3d 31 30 30 2f 72 4c |. Scale|:=100/rL|
|00002cd0| 65 6e 67 74 68 5b 72 43 | 6f 75 6e 74 5d 29 3b 0d |ength[rC|ount]);.|
|00002ce0| 20 20 69 66 20 73 63 61 | 6c 65 3d 31 0d 20 20 20 | if sca|le=1. |
|00002cf0| 20 74 68 65 6e 20 50 75 | 74 4d 65 73 73 61 67 65 | then Pu|tMessage|
|00002d00| 28 27 49 6d 61 67 65 20 | 69 73 20 6e 6f 74 20 73 |('Image |is not s|
|00002d10| 70 61 74 69 61 6c 6c 79 | 20 63 61 6c 69 62 72 61 |patially| calibra|
|00002d20| 74 65 64 27 29 0d 20 20 | 20 20 65 6c 73 65 20 50 |ted'). | else P|
|00002d30| 75 74 4d 65 73 73 61 67 | 65 28 27 53 63 61 6c 65 |utMessag|e('Scale|
|00002d40| 3d 27 2c 73 63 61 6c 65 | 3a 31 3a 34 2c 27 20 70 |=',scale|:1:4,' p|
|00002d50| 69 78 65 6c 73 2f 75 6e | 69 74 27 29 3b 0d 65 6e |ixels/un|it');.en|
|00002d60| 64 3b 0d 0d 0d 6d 61 63 | 72 6f 20 27 53 74 6f 72 |d;...mac|ro 'Stor|
|00002d70| 65 20 42 72 65 61 6b 20 | 69 6e 20 52 65 73 75 6c |e Break |in Resul|
|00002d80| 74 73 20 5b 53 5d 27 3b | 0d 7b 53 74 6f 72 65 73 |ts [S]';|.{Stores|
|00002d90| 20 61 20 72 6f 77 20 6f | 66 20 7a 65 72 6f 73 20 | a row o|f zeros |
|00002da0| 69 6e 20 74 68 65 20 72 | 65 73 75 6c 74 73 20 74 |in the r|esults t|
|00002db0| 61 62 6c 65 2e 7d 0d 62 | 65 67 69 6e 0d 20 20 4d |able.}.b|egin. M|
|00002dc0| 65 61 73 75 72 65 3b 0d | 20 20 72 41 72 65 61 5b |easure;.| rArea[|
|00002dd0| 72 43 6f 75 6e 74 5d 3a | 3d 30 3b 0d 20 20 72 4d |rCount]:|=0;. rM|
|00002de0| 65 61 6e 5b 72 43 6f 75 | 6e 74 5d 3a 3d 30 3b 0d |ean[rCou|nt]:=0;.|
|00002df0| 20 20 72 53 74 64 44 65 | 76 5b 72 43 6f 75 6e 74 | rStdDe|v[rCount|
|00002e00| 5d 3a 3d 30 3b 0d 20 20 | 72 58 5b 72 43 6f 75 6e |]:=0;. |rX[rCoun|
|00002e10| 74 5d 3a 3d 30 3b 0d 20 | 20 72 59 5b 72 43 6f 75 |t]:=0;. | rY[rCou|
|00002e20| 6e 74 5d 3a 3d 30 3b 0d | 20 20 72 4c 65 6e 67 74 |nt]:=0;.| rLengt|
|00002e30| 68 5b 72 43 6f 75 6e 74 | 5d 3a 3d 30 3b 0d 20 20 |h[rCount|]:=0;. |
|00002e40| 72 4d 61 6a 6f 72 5b 72 | 43 6f 75 6e 74 5d 3a 3d |rMajor[r|Count]:=|
|00002e50| 30 3b 0d 20 20 72 4d 69 | 6e 6f 72 5b 72 43 6f 75 |0;. rMi|nor[rCou|
|00002e60| 6e 74 5d 3a 3d 30 3b 0d | 20 20 72 41 6e 67 6c 65 |nt]:=0;.| rAngle|
|00002e70| 5b 72 43 6f 75 6e 74 5d | 3a 3d 30 3b 0d 20 20 55 |[rCount]|:=0;. U|
|00002e80| 70 64 61 74 65 52 65 73 | 75 6c 74 73 3b 0d 65 6e |pdateRes|ults;.en|
|00002e90| 64 3b 0d 0d 0d 6d 61 63 | 72 6f 20 27 4d 65 61 73 |d;...mac|ro 'Meas|
|00002ea0| 75 72 65 20 62 6f 74 68 | 20 52 61 77 20 61 6e 64 |ure both| Raw and|
|00002eb0| 20 43 61 6c 69 62 72 61 | 74 65 64 27 3b 0d 7b 0d | Calibra|ted';.{.|
|00002ec0| 54 68 69 73 20 6d 61 63 | 72 6f 20 69 73 20 61 20 |This mac|ro is a |
|00002ed0| 76 61 72 69 61 74 69 6f | 6e 20 6f 66 20 74 68 65 |variatio|n of the|
|00002ee0| 20 4d 65 61 73 75 72 65 | 20 63 6f 6d 6d 61 6e 64 | Measure| command|
|00002ef0| 20 74 68 61 74 20 64 69 | 73 70 6c 61 79 73 20 74 | that di|splays t|
|00002f00| 68 65 20 6e 75 6d 62 65 | 72 0d 6f 66 20 70 69 78 |he numbe|r.of pix|
|00002f10| 65 6c 73 20 69 6e 20 55 | 73 65 72 31 20 61 6e 64 |els in U|ser1 and|
|00002f20| 20 75 6e 63 61 6c 69 62 | 72 61 74 65 64 28 72 61 | uncalib|rated(ra|
|00002f30| 77 29 20 6d 65 61 6e 20 | 64 65 6e 73 69 74 79 20 |w) mean |density |
|00002f40| 69 6e 20 55 73 65 72 32 | 2e 20 49 74 20 74 61 6b |in User2|. It tak|
|00002f50| 65 73 0d 61 64 76 61 6e | 74 61 67 65 20 6f 66 20 |es.advan|tage of |
|00002f60| 74 68 65 20 66 61 63 74 | 20 74 68 61 74 20 47 65 |the fact| that Ge|
|00002f70| 74 52 65 73 75 6c 74 73 | 20 61 6c 77 61 79 73 20 |tResults| always |
|00002f80| 72 65 74 75 72 6e 73 20 | 75 6e 63 61 6c 69 62 72 |returns |uncalibr|
|00002f90| 61 74 65 64 20 76 61 6c | 75 65 73 2e 0d 7d 0d 76 |ated val|ues..}.v|
|00002fa0| 61 72 0d 20 20 6e 50 69 | 78 65 6c 73 2c 6d 65 61 |ar. nPi|xels,mea|
|00002fb0| 6e 2c 6d 6f 64 65 2c 6d | 69 6e 2c 6d 61 78 3a 72 |n,mode,m|in,max:r|
|00002fc0| 65 61 6c 3b 0d 62 65 67 | 69 6e 0d 20 20 53 65 74 |eal;.beg|in. Set|
|00002fd0| 55 73 65 72 31 4c 61 62 | 65 6c 28 27 50 69 78 65 |User1Lab|el('Pixe|
|00002fe0| 6c 73 27 29 3b 0d 20 20 | 53 65 74 55 73 65 72 32 |ls');. |SetUser2|
|00002ff0| 4c 61 62 65 32 28 27 52 | 61 77 20 4d 65 61 6e 27 |Labe2('R|aw Mean'|
|00003000| 29 3b 0d 20 20 4d 65 61 | 73 75 72 65 3b 0d 20 20 |);. Mea|sure;. |
|00003010| 47 65 74 52 65 73 75 6c | 74 73 28 6e 50 69 78 65 |GetResul|ts(nPixe|
|00003020| 6c 73 2c 6d 65 61 6e 2c | 6d 6f 64 65 2c 6d 69 6e |ls,mean,|mode,min|
|00003030| 2c 6d 61 78 29 3b 0d 20 | 20 72 55 73 65 72 31 5b |,max);. | rUser1[|
|00003040| 72 43 6f 75 6e 74 5d 3a | 3d 6e 50 69 78 65 6c 73 |rCount]:|=nPixels|
|00003050| 3b 0d 20 20 72 55 73 65 | 72 32 5b 72 43 6f 75 6e |;. rUse|r2[rCoun|
|00003060| 74 5d 3a 3d 6d 65 61 6e | 3b 0d 20 20 55 70 64 61 |t]:=mean|;. Upda|
|00003070| 74 65 52 65 73 75 6c 74 | 73 3b 0d 65 6e 64 3b 0d |teResult|s;.end;.|
|00003080| 0d 0d 0d 0d 0d 0d 0d 0d | 00 00 00 00 00 00 00 00 |........|........|
|00003090| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000030a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000030b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000030c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000030d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000030e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000030f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003100| 00 00 01 00 00 00 01 00 | 00 00 00 00 00 00 00 1e |........|........|
|00003110| 02 44 40 e5 40 06 40 f0 | 18 49 f6 00 00 4a 6e ff |.D@.@.@.|.I...Jn.|
|00003120| c4 6c 0a 3f 14 2f 0e 4e | ad 00 00 60 0e 30 2c 00 |.l.?./.N|...`.0,.|
|00003130| 12 4d 65 61 73 75 72 65 | 6d 65 6e 74 20 4d 61 63 |.Measure|ment Mac|
|00003140| 72 6f 73 75 02 00 00 00 | 50 61 72 74 53 49 54 21 |rosu....|PartSIT!|
|00003150| 00 00 50 61 72 74 53 49 | 54 21 00 00 00 00 00 00 |..PartSI|T!......|
|00003160| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003170| 00 00 a8 11 59 70 00 00 | 00 00 00 00 01 1e 2d 4b |....Yp..|......-K|
|00003180| 20 00 30 f2 2d 43 80 00 | 08 f2 2d 4b a0 00 30 f2 | .0.-C..|..-K..0.|
|00003190| 2d 4a 00 00 0c f2 2d 4a | 20 00 30 f2 2d 48 00 00 |-J....-J| .0.-H..|
|000031a0| 18 f2 2d 48 20 00 30 f2 | 2e 68 00 ff c0 f2 2d 4a |..-H .0.|.h....-J|
|000031b0| 80 00 24 f2 2d 4a a0 00 | 30 f2 2d 6b 00 00 3c f2 |..$.-J..|0.-k..<.|
|000031c0| 2d 6b 80 00 48 f2 00 18 | 00 f2 00 00 23 f2 00 10 |-k..H...|....#...|
|000031d0| 80 f2 00 00 a8 f2 2d 68 | 80 00 54 f2 00 1c 00 f2 |......-h|..T.....|
|000031e0| 00 00 23 f2 2e 48 80 ff | c0 f2 00 00 a8 f2 2d 68 |..#..H..|......-h|
|000031f0| 80 00 60 f2 00 18 00 f2 | 00 1c 23 f2 00 14 80 f2 |..`.....|..#.....|
|00003200| 00 00 01 00 00 00 01 00 | 00 00 00 00 00 00 00 1e |........|........|
|00003210| 00 00 00 00 00 00 00 00 | 00 1c 00 1e ff ff 00 00 |........|........|
|00003220| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003230| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003240| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003250| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003260| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00003270| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+